@lightningjs/blits 1.14.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.14.1
4
+
5
+ _8 jan 2025_
6
+
7
+ - Fixed `undefined`-error with intercept method, when no input object is specified on root App component
8
+
9
+
3
10
  ## v1.14.0
4
11
 
5
12
  _6 jan 2025_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightningjs/blits",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "Blits: The Lightning 3 App Development Framework",
5
5
  "bin": "bin/index.js",
6
6
  "exports": {
@@ -59,7 +59,10 @@ const Application = (config) => {
59
59
  keyDownHandler = async (e) => {
60
60
  const key = keyMap[e.key] || keyMap[e.keyCode] || e.key || e.keyCode
61
61
  // intercept key press if specified in main Application component
62
- if (this[symbols.inputEvents].intercept !== undefined) {
62
+ if (
63
+ this[symbols.inputEvents] !== undefined &&
64
+ this[symbols.inputEvents].intercept !== undefined
65
+ ) {
63
66
  e = await this[symbols.inputEvents].intercept.call(this, e)
64
67
  // only pass on the key press to focused component when keyboard event is returned
65
68
  if (e instanceof KeyboardEvent === false) return