Skip to content

v-else fails on "prod" build when preceded by an HTML comment #1256

Closed
@marcusball

Description

@marcusball

Version

3.0.0-beta.14

Reproduction link

https://jsbin.com/vazujatufe/1/edit?html,output

Steps to reproduce

Use Vue via the embedded CDN "vue.global.prod.js" file.

Place an HTML comment block (<!-- -->) just before an element using v-else.

What is expected?

An element with a v-else condition should not be rendered when the preceding v-if condition is satisfied. HTML comments should not effect rendering behavior.

What is actually happening?

The element will still be visible even if the preceding v-if condition is satisfied.

If the comment block is removed, the v-else condition will work properly.


This issue is NOT present with the dev "vue.global.js" CDN file, as can be seen if you swap the commented out <script> tags in the minimal reproduction example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions