Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
john-gold opened this issue Oct 22, 2016 · 1 comment
Closed
Labels

Comments

@john-gold
Copy link

john-gold commented Oct 22, 2016

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

@defcc defcc added the 2.0 label Oct 23, 2016
@csytan
Copy link

csytan commented Oct 30, 2016

Also experiencing this with vueify ^9.2.4.

Works:
{{ 12 > time.hours ? 'AM' : 'PM' }}

Doesn't work:
{{ time.hours < 12 ? 'AM' : 'PM' }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants