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

Template syntax error #2859

Closed
1 of 7 tasks
joshuakb2 opened this issue May 1, 2020 · 1 comment
Closed
1 of 7 tasks

Template syntax error #2859

joshuakb2 opened this issue May 1, 2020 · 1 comment
Assignees

Comments

@joshuakb2
Copy link

joshuakb2 commented May 1, 2020

This is similar to issue #2719

  1. Describe your issue:

Not all JavaScript expressions work in a template expression. This is unexpected particularly because the documentation says in the Syntax section:

All template expressions are "just javascript."

  1. Can you reproduce the issue?

Here's an example using valid JavaScript that causes a syntax error:

<div>{ ['Hello', 'world!'].join(' ') }</div>
  1. On which browser/OS does the issue appear?

Chrome, but I'm assuming everywhere.

  1. Which version of Riot does it affect?

Riot 4.0.3.

  1. How would you tag this issue?
  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance

It seems like either the documentation should be improved, or templates should support all valid JavaScript syntax.

@GianlucaGuarini
Copy link
Member

GianlucaGuarini commented May 16, 2020

Thank you, it was a compiler issue. It got fixed in Riot.js@4.12.4

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