dom-expressions 0.32.2 → 0.32.5
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/package.json +2 -2
- package/src/client.js +4 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dom-expressions",
|
|
3
3
|
"description": "A Fine-Grained Runtime for Performant DOM Rendering",
|
|
4
|
-
"version": "0.32.
|
|
4
|
+
"version": "0.32.5",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"babel-plugin-jsx-dom-expressions": "^0.32.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "009e855385624579842718bc55f2d55ac8fd21c3"
|
|
26
26
|
}
|
package/src/client.js
CHANGED
|
@@ -366,14 +366,14 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
366
366
|
effect(() => (current = insertExpression(parent, array, current, marker, true)));
|
|
367
367
|
return () => current;
|
|
368
368
|
}
|
|
369
|
-
if (sharedConfig.context
|
|
369
|
+
if (sharedConfig.context) {
|
|
370
370
|
for (let i = 0; i < array.length; i++) {
|
|
371
371
|
if (array[i].parentNode) return (current = array);
|
|
372
372
|
}
|
|
373
|
-
return current;
|
|
374
373
|
}
|
|
375
374
|
if (array.length === 0) {
|
|
376
|
-
cleanChildren(parent, current, marker);
|
|
375
|
+
current = cleanChildren(parent, current, marker);
|
|
376
|
+
if (multi) return current;
|
|
377
377
|
} else if (Array.isArray(current)) {
|
|
378
378
|
if (current.length === 0) {
|
|
379
379
|
appendNodes(parent, array, marker);
|
|
@@ -384,8 +384,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
384
384
|
}
|
|
385
385
|
current = array;
|
|
386
386
|
} else if (value instanceof Node) {
|
|
387
|
-
if (sharedConfig.context)
|
|
388
|
-
return (current = value.parentNode ? (multi ? [value] : value) : current);
|
|
387
|
+
if (sharedConfig.context && value.parentNode) return (current = multi ? [value] : value);
|
|
389
388
|
if (Array.isArray(current)) {
|
|
390
389
|
if (multi) return (current = cleanChildren(parent, current, marker, value));
|
|
391
390
|
cleanChildren(parent, current, null, value);
|