-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Description
Version
2.6.11
Reproduction link
https://codesandbox.io/s/sad-benz-d69xb
Steps to reproduce
Not sure if this applies to vue or vue-loader. It seems v-if statements are not processed correctly when inside a root template tag.
Suppose you have the following .vue file:
<template v-if="true">
<p>test</p>
</template>
<template v-else>
<p>test2</p>
</template>
What is expected?
The test paragraph should be rendered as v-if is true (also tested with other more complicated truthy conditions)
What is actually happening?
The test2 paragraph is rendered.
It seems always the last template tag, having either v-else or any v-else-if statement is rendered, even if that v-else-if condition is false.
Metadata
Metadata
Assignees
Labels
No labels