Skip to content

Commit 355c052

Browse files
committedJul 28, 2020
fix(runtime-core): dev root resolution should differentiate user comments vs v-if comments
fix #1704
1 parent 578f25c commit 355c052

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎packages/runtime-core/src/componentRenderUtils.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,11 @@ const getChildRoot = (
235235
const rawChildren = vnode.children as VNodeArrayChildren
236236
const dynamicChildren = vnode.dynamicChildren as VNodeArrayChildren
237237
const children = rawChildren.filter(child => {
238-
return !(isVNode(child) && child.type === Comment)
238+
return !(
239+
isVNode(child) &&
240+
child.type === Comment &&
241+
child.children !== 'v-if'
242+
)
239243
})
240244
if (children.length !== 1) {
241245
return [vnode, undefined]

0 commit comments

Comments
 (0)
Please sign in to comment.