fix(compiler-dom): comments in the v-if branchs should be ignored when used in Transition (#3622)
fix #3619
This commit is contained in:
@@ -138,3 +138,21 @@ describe('compiler warnings', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
test('the v-if/else-if/else branchs in Transition should ignore comments', () => {
|
||||
expect(
|
||||
compile(`
|
||||
<transition>
|
||||
<div v-if="a">hey</div>
|
||||
<!-- this should be ignored -->
|
||||
<div v-else-if="b">hey</div>
|
||||
<!-- this should be ignored -->
|
||||
<div v-else>
|
||||
<p v-if="c"/>
|
||||
<!-- this should not be ignored -->
|
||||
<p v-else/>
|
||||
</div>
|
||||
</transition>
|
||||
`).code
|
||||
).toMatchSnapshot()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user