Skip to content

Commit

Permalink
Merge 1bd8d6d into 796da5f
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Feb 15, 2020
2 parents 796da5f + 1bd8d6d commit 191ac4b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/diff/children.js
Expand Up @@ -98,6 +98,12 @@ export function diffChildren(

oldVNode = oldVNode || EMPTY_OBJ;

// If the previous node was a placeholder we pick a new value
// for oldDom
if (oldDom === undefined) {
oldDom = oldVNode._dom || null;
}

// Morph the old element into the new one, but don't append it to the dom yet
newDom = diff(
parentDom,
Expand Down Expand Up @@ -197,6 +203,9 @@ export function diffChildren(

newParentVNode._nextDom = oldDom;
}
} else {
// If newDom is null we have a placeholder node
oldDom = undefined;
}
}

Expand Down

0 comments on commit 191ac4b

Please sign in to comment.