Riot: Template syntax error

Created on 1 May 2020  路  1Comment  路  Source: riot/riot

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
    • [x] Bug
    • [ ] Discussion
    • [ ] Feature request
    • [ ] Tip
    • [ ] Enhancement
    • [ ] Performance

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

bug fixed

Most helpful comment

Thank you, it was a compiler issue. It got fixed in Riot.[email protected]

>All comments

Thank you, it was a compiler issue. It got fixed in Riot.[email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danawoodman picture danawoodman  路  3Comments

jfbrennan picture jfbrennan  路  3Comments

chrisk314 picture chrisk314  路  3Comments

etamponi picture etamponi  路  3Comments

syuilo picture syuilo  路  3Comments