Skip to content

Commit

Permalink
fix: patch void element lost dom reference
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Mar 26, 2018
1 parent 6691262 commit 32f403d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nerv/src/vdom/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export function patch (
} else if (vtype & VType.Portal) {
patchChildren(lastVnode.type, lastVnode.children, nextVnode.children, context, isSvg as boolean)
}
nextVnode.dom = newDom
// @TODO: test case
nextVnode.dom = newDom || lastDom
} else {
unmount(lastVnode)
newDom = createElement(nextVnode, isSvg, context)
Expand Down

0 comments on commit 32f403d

Please sign in to comment.