fix(compiler-core): fix v-if block handling for components that fail to resolve
fix #2058
This commit is contained in:
@@ -93,10 +93,12 @@ describe('compiler: v-if', () => {
|
||||
expect((node.branches[0].children[0] as ElementNode).tagType).toBe(
|
||||
ElementTypes.COMPONENT
|
||||
)
|
||||
// #2058 since a component may fail to resolve and fallback to a plain
|
||||
// element, it still needs to be made a block
|
||||
expect(
|
||||
((node.branches[0].children[0] as ElementNode)!
|
||||
.codegenNode as VNodeCall)!.isBlock
|
||||
).toBe(false)
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
test('v-if + v-else', () => {
|
||||
|
||||
Reference in New Issue
Block a user