nexa-runtime 0.7.3 → 0.7.4
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/dist/scheduler.js +1 -1
- package/dist/vdom/dom.js +6 -1
- package/dist/vdom/patch.js +2 -1
- package/package.json +2 -2
package/dist/scheduler.js
CHANGED
|
@@ -25,7 +25,7 @@ export function flushJobs() {
|
|
|
25
25
|
const jobs = Array.from(pendingJobs).sort((a, b) => a.depth - b.depth);
|
|
26
26
|
pendingJobs.clear();
|
|
27
27
|
for (const instance of jobs) {
|
|
28
|
-
if (instance.update && typeof instance.update.run === 'function') {
|
|
28
|
+
if (instance.update && typeof instance.update.run === 'function' && instance.update.active) {
|
|
29
29
|
instance.update.run();
|
|
30
30
|
}
|
|
31
31
|
}
|
package/dist/vdom/dom.js
CHANGED
|
@@ -110,7 +110,12 @@ export const domOptions = {
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
insert(el, parent, anchor = null) {
|
|
113
|
-
|
|
113
|
+
if (anchor && anchor.parentNode !== parent) {
|
|
114
|
+
parent.appendChild(el);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
parent.insertBefore(el, anchor);
|
|
118
|
+
}
|
|
114
119
|
},
|
|
115
120
|
remove(el) {
|
|
116
121
|
const parent = el.parentNode;
|
package/dist/vdom/patch.js
CHANGED
|
@@ -137,7 +137,8 @@ function mountChildren(vnode, parent, options, anchor = null) {
|
|
|
137
137
|
}
|
|
138
138
|
function replaceNode(oldV, newV, parent, options, anchor) {
|
|
139
139
|
unmount(oldV, parent, options);
|
|
140
|
-
|
|
140
|
+
const safeAnchor = (anchor && anchor.parentNode === parent) ? anchor : null;
|
|
141
|
+
mount(newV, parent, options, safeAnchor);
|
|
141
142
|
}
|
|
142
143
|
function updateNode(vnode, options) {
|
|
143
144
|
const { patchProp, setText } = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexa-runtime",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"nexa-reactivity": "0.7.
|
|
16
|
+
"nexa-reactivity": "0.7.4"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|