@lightningjs/blits 1.29.1 → 1.29.2
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
package/package.json
CHANGED
|
@@ -29,6 +29,8 @@ export default {
|
|
|
29
29
|
},
|
|
30
30
|
$listen: {
|
|
31
31
|
value: function (event, callback, priority = 0) {
|
|
32
|
+
// early exit when component is marked as end of life
|
|
33
|
+
if (this.eol === true) return
|
|
32
34
|
eventListeners.registerListener(this, event, callback, priority)
|
|
33
35
|
},
|
|
34
36
|
writable: false,
|
|
@@ -20,6 +20,8 @@ import symbols from '../../lib/symbols.js'
|
|
|
20
20
|
export default {
|
|
21
21
|
$setTimeout: {
|
|
22
22
|
value: function (fn, ms, ...params) {
|
|
23
|
+
// early exit when component is marked as end of life
|
|
24
|
+
if (this.eol === true) return
|
|
23
25
|
const timeoutId = setTimeout(
|
|
24
26
|
() => {
|
|
25
27
|
this[symbols.timeouts] = this[symbols.timeouts].filter((id) => id !== timeoutId)
|
|
@@ -59,6 +61,8 @@ export default {
|
|
|
59
61
|
},
|
|
60
62
|
$setInterval: {
|
|
61
63
|
value: function (fn, ms, ...params) {
|
|
64
|
+
// early exit when component is marked as end of life
|
|
65
|
+
if (this.eol === true) return
|
|
62
66
|
const intervalId = setInterval(() => fn.apply(null, params), ms, params)
|
|
63
67
|
this[symbols.intervals].push(intervalId)
|
|
64
68
|
return intervalId
|