Skip to content

Commit 8325d96

Browse files
committed
Revert "Always return the sibling cursor from element diffs"
This reverts commit 6df9a00.
1 parent 6df9a00 commit 8325d96

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/diff/children.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function diffChildren(
141141
if (oldVNode._dom) {
142142
oldVNode._dom = NULL;
143143
}
144-
} else if (result !== UNDEFINED) {
144+
} else if (typeof childVNode.type == 'function' && result !== UNDEFINED) {
145145
oldDom = result;
146146
} else if (newDom) {
147147
oldDom = newDom.nextSibling;

src/diff/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function diff(
7272

7373
// When passing through createElement it assigns the object
7474
// constructor as undefined. This to prevent JSON-injection.
75-
if (newVNode.constructor !== UNDEFINED) return UNDEFINED;
75+
if (newVNode.constructor !== UNDEFINED) return NULL;
7676

7777
// If the previous diff bailed out, resume creating/hydrating.
7878
if (
@@ -426,7 +426,7 @@ export function diff(
426426
options._catchError(e, newVNode, oldVNode);
427427
}
428428
} else {
429-
oldDom = (newVNode._dom = diffElementNodes(
429+
oldDom = newVNode._dom = diffElementNodes(
430430
oldVNode._dom,
431431
newVNode,
432432
oldVNode,
@@ -437,7 +437,7 @@ export function diff(
437437
isHydrating,
438438
refQueue,
439439
parentDom
440-
)).nextSibling;
440+
);
441441
}
442442

443443
if ((tmp = options.diffed)) tmp(newVNode);

0 commit comments

Comments
 (0)