Skip to content

strange behavior when using conditional operator in text/x-templates #4012

@jwldr

Description

@jwldr

Hello,

while working on a private project I came across an strange error, so I simplified the code which will reproduce it, anyways it makes no sense to me.

The problem only exists when using <script type="text/x-template">.
Replacing the <script> tag with a <template> tag makes both versions work again, same applies if I dont use a template at all e.g. use a custom element component.

Vue.js version

2.0.3

Reproduction Link

working: https://jsbin.com/gulopup
not working: https://jsbin.com/siyesev

Steps to reproduce

change ((concert.bands.length - 2) > index) to (index < (concert.bands.length - 2))

What is Expected?

both version should work

What is actually happening?

the latter version throws error while parsing the template

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions