Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Setting array on ViewModel prune Array prototype. #1

Open
jacquarg opened this issue Oct 14, 2015 · 0 comments
Open

Setting array on ViewModel prune Array prototype. #1

jacquarg opened this issue Oct 14, 2015 · 0 comments
Labels

Comments

@jacquarg
Copy link

 @set 'arrayField', ["a", "b"]
 console.log JSON.stringify @attributes.arrayField
> { "1": "a", "2": "b" } # expected : [ "a", "b"]

See https://github.com/jacquarg/cozy-contacts/blob/duplicates/client/app/views/models/merge.coffee#L21-L22

Setting directly @attributes.arrayField = ["a", "b"] works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants