From a08f3a82b5b472ec605aa07a8df53d976336da44 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 16 Dec 2020 15:18:26 -0500 Subject: [PATCH] fix(vdom): prevent error for parentless nodes (#2761) --- src/runtime/vdom/vdom-render.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/vdom/vdom-render.ts b/src/runtime/vdom/vdom-render.ts index 14b3c9922fe..9350c831e60 100644 --- a/src/runtime/vdom/vdom-render.ts +++ b/src/runtime/vdom/vdom-render.ts @@ -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;