You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://github.com/masayuki0812/c3/blob/master/src/data.convert.js#L37-L41
These lines of code are causing me headache because they are mutating my settings array that holds my keys by pushing the x key onto the end of the array. I use this array for filtering my collection in my subscription model, e.g., {key:{$exists:true}} in Mongo. When x is pushed onto this array, my subscription expands to include all documents that have x. (It also seems to push x repeatedely whenever I have a refresh. So I get multiple instances on x on the array.)
To make this snippet of code more immutable, I've changed it to the following (avoiding the .push() part of it.)
Thank you for pointing this out. Yeah, you're right, and I think this has been fixed by this commit above. I'll release this fix in the next version 0.4.10 shortly. Thank you.
https://github.com/masayuki0812/c3/blob/master/src/data.convert.js#L37-L41
These lines of code are causing me headache because they are mutating my settings array that holds my
keys
by pushing thex
key onto the end of the array. I use this array for filtering my collection in my subscription model, e.g.,{key:{$exists:true}}
in Mongo. Whenx
is pushed onto this array, my subscription expands to include all documents that havex
. (It also seems to pushx
repeatedely whenever I have a refresh. So I get multiple instances onx
on the array.)To make this snippet of code more immutable, I've changed it to the following (avoiding the
.push()
part of it.)I'm not exactly sure why or how it's mutating my array, but it sure has been a pain. Please consider committing this change in a future update.
Thanks!
The text was updated successfully, but these errors were encountered: