Skip to content

Commit

Permalink
fix(vdom): prevent error for parentless nodes (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska authored Dec 16, 2020
1 parent 2dc930f commit a08f3a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/vdom/vdom-render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ const relocateSlotContent = (elm: d.RenderNode) => {
for (; i < ilen; i++) {
childNode = childNodes[i];

if (childNode['s-sr'] && (node = childNode['s-cr'])) {
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
// first got the content reference comment node
// then we got it's parent, which is where all the host content is in now
hostContentNodes = node.parentNode.childNodes;
Expand Down

0 comments on commit a08f3a8

Please sign in to comment.