@lightningjs/blits 1.38.0 → 1.38.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
package/package.json
CHANGED
|
@@ -31,6 +31,8 @@ export default {
|
|
|
31
31
|
*/
|
|
32
32
|
$emit: {
|
|
33
33
|
value: function (event, params, byReference = true) {
|
|
34
|
+
// early exit when component is marked as end of life
|
|
35
|
+
if (this.eol === true) return
|
|
34
36
|
// returning if all listeners executed
|
|
35
37
|
return eventListeners.executeListeners(event, params, byReference)
|
|
36
38
|
},
|
|
@@ -153,6 +153,9 @@ export default {
|
|
|
153
153
|
* @this {import('../../component').BlitsComponent}
|
|
154
154
|
*/
|
|
155
155
|
value: function (ref) {
|
|
156
|
+
// early exit when component is marked as end of life
|
|
157
|
+
if (this.eol === true) return
|
|
158
|
+
|
|
156
159
|
let selected = null
|
|
157
160
|
this[symbols.children].forEach((child) => {
|
|
158
161
|
if (Array.isArray(child)) {
|
package/src/router/router.js
CHANGED
|
@@ -390,7 +390,7 @@ export const navigate = async function () {
|
|
|
390
390
|
shouldAnimate = true
|
|
391
391
|
const oldView = this[symbols.children].splice(1, 1).pop()
|
|
392
392
|
if (oldView) {
|
|
393
|
-
removeView(previousRoute, oldView, route.transition.out)
|
|
393
|
+
removeView(previousRoute, oldView, route.transition.out, navigatingBack)
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
|
|
@@ -432,7 +432,7 @@ export const navigate = async function () {
|
|
|
432
432
|
* @param {BlitsComponent} view
|
|
433
433
|
* @param {Object} transition
|
|
434
434
|
*/
|
|
435
|
-
const removeView = async (route, view, transition) => {
|
|
435
|
+
const removeView = async (route, view, transition, navigatingBack) => {
|
|
436
436
|
// apply out transition
|
|
437
437
|
if (transition) {
|
|
438
438
|
if (Array.isArray(transition)) {
|
|
@@ -479,9 +479,10 @@ const setOrAnimate = (node, transition, shouldAnimate = true) => {
|
|
|
479
479
|
existingEndCallback = null
|
|
480
480
|
resolve()
|
|
481
481
|
}
|
|
482
|
-
node.set(transition.prop, { transition })
|
|
482
|
+
if (node !== undefined) node.set(transition.prop, { transition })
|
|
483
|
+
else resolve()
|
|
483
484
|
} else {
|
|
484
|
-
node.set(transition.prop, transition.value)
|
|
485
|
+
node !== undefined && node.set(transition.prop, transition.value)
|
|
485
486
|
resolve()
|
|
486
487
|
}
|
|
487
488
|
})
|