Each and switching between object and array #2027

Closed
pavel opened this Issue Oct 16, 2016 · 2 comments

Projects

None yet

2 participants

@pavel
pavel commented Oct 16, 2016 edited
  1. Describe your issue:
    each={ item in iterable } stops working when the iterable is switched from an object to an array.
  2. Can you reproduce the issue?
    Demo URL: http://jsfiddle.net/k6L77wpx/3/.
    To reproduce:
    • click "Switch" one time (switch from array to object). Notice that data changes.
    • Hit "Switch" second time (switch from object to array). Notice how this.current changes while each does not reflect the change.
    • From this point each does not reflect changes anymore.
  3. On which browser/OS does the issue appear?
    Any browser/OS.
  4. Which version of Riot does it affect?
    Tested against riot@next and v3.0.0-alpha.11. Testing against previous versions makes little sense due to #1420.
  5. How would you tag this issue?
    • Question
    • Bug
    • Discussion
    • Feature request
    • Tip
    • Enhancement
    • Performance
@GianlucaGuarini GianlucaGuarini added the bug label Oct 16, 2016
@GianlucaGuarini
Member
GianlucaGuarini commented Oct 16, 2016 edited

@pavel nice one thanks! This seems to be a bug but I need to verify what's wrong

@pavel
pavel commented Oct 16, 2016

@GianlucaGuarini You're welcome.

@danielkrainas danielkrainas added a commit to danielkrainas/riot that referenced this issue Oct 18, 2016
@danielkrainas danielkrainas add test for #2027 3610b1f
@GianlucaGuarini GianlucaGuarini added this to the 3.0.0 milestone Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment