From: Evan You Date: Tue, 28 Jul 2020 18:15:20 +0000 (-0400) Subject: fix(runtime-core): dev root resolution should differentiate user comments vs v-if... X-Git-Tag: v3.0.0-rc.5~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=355c05262252b247ec29ed4c4fd6ab69143dd6b7;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): dev root resolution should differentiate user comments vs v-if comments fix #1704 --- diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index 5f3910f7cc..2c05358d56 100644 --- a/packages/runtime-core/src/componentRenderUtils.ts +++ b/packages/runtime-core/src/componentRenderUtils.ts @@ -235,7 +235,11 @@ const getChildRoot = ( const rawChildren = vnode.children as VNodeArrayChildren const dynamicChildren = vnode.dynamicChildren as VNodeArrayChildren const children = rawChildren.filter(child => { - return !(isVNode(child) && child.type === Comment) + return !( + isVNode(child) && + child.type === Comment && + child.children !== 'v-if' + ) }) if (children.length !== 1) { return [vnode, undefined]