Riot: Loop value not rendering if it's named as "status"

Created on 16 Aug 2020  路  3Comments  路  Source: riot/riot

Help us to manage our issues by answering the following:

  1. Describe your issue:

If you do an each loop and name the value as status, it won't render in the DOM. Wrapping elements and nodes do render, but not the actual value. There might be some other keywords that act the same.

  1. Can you reproduce the issue?

    https://plnkr.co/edit/VejWhQV5QeA5G97Y

  2. On which browser/OS does the issue appear?

Windows 10, Chrome v84.0.4147.125

  1. Which version of Riot does it affect?

v4.12.0

  1. How would you tag this issue?

    • [ ] Question
    • [x] Bug
    • [ ] Discussion
    • [ ] Feature request
    • [ ] Tip
    • [ ] Enhancement
    • [ ] Performance
breaking change enhancement

Most helpful comment

I am afraid that patching this behavior will be a braking change. I will need to think about it.

All 3 comments

Apparently the status property is a global variable and that's why your expression doesn't work. It's like writing { window.location }, the current behavior is unintended and should be fixed though! I am on it, thanks for reporting it

I am afraid that patching this behavior will be a braking change. I will need to think about it.

No worries, this bug can easily be avoided by naming the loop value to something else, so take your time!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

etamponi picture etamponi  路  3Comments

nodefish picture nodefish  路  3Comments

vogloblinsky picture vogloblinsky  路  3Comments

jfbrennan picture jfbrennan  路  3Comments

awei01 picture awei01  路  3Comments