arch-js / arch

Web application framework for React by Red Badger
BSD 3-Clause "New" or "Revised" License
170 stars 13 forks source link

Single-item array in initial-state is not an array in the cursor #90

Closed chrisvfritz closed 9 years ago

chrisvfritz commented 9 years ago

I have a single object in an array in initial-state. When I deref the array in the cursor though, it has not correctly become an array and is instead just the single object.

chrisvfritz commented 9 years ago

Good news! Turns out this isn't a bug in Arch. In fact, it's not a bug at all, but a "feature" of LiveScript.

Ugh... of course, I ran through every level of my app and then every level of the cursor and application modules in Arch before realizing this, all thanks to my apparently foolish assumption that declaring an array will declare an array, no matter the size of the array.