rtfeldman / seamless-immutable

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.
BSD 3-Clause "New" or "Revised" License
5.37k stars 194 forks source link

Array is treated as object in certain setup #146

Closed variant77 closed 7 years ago

variant77 commented 8 years ago

It happens only on one of my computers and I could not understand why but Immutable fails to detect arrays as such and treats them like regular objects.

The simple reconstruction:

Immutable = require('seamless-immutable')
Immutable([1,2,3])
//output is:
{ '0': 1, '1': 2, '2': 3 }
tommoor commented 7 years ago

This also happens in our environment - really frustrating as it makes it impossible to create Immutable arrays. I'd love to see your PR specs fixed up and merged!

variant77 commented 7 years ago

Thanks for letting more know I was not the only one affected. At some point I was losing my mind over it.

My PR seem to be just fine, all the tests poss when I run them locally. There is some configuration error in the repo that causes all PRs to fail.

If you want to use the fixed version before the PR is merged you can use my fork for now and subscribe to this thread to know when to switch back.

On Fri, Sep 9, 2016, 01:28 Tom Moor notifications@github.com wrote:

This also happens in our environment - really frustrating as it makes it impossible to create Immutable arrays. I'd love to see your PR specs fixed up and merged!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rtfeldman/seamless-immutable/issues/146#issuecomment-245761781, or mute the thread https://github.com/notifications/unsubscribe-auth/AByTcZMvKNcMgJBZvBBxjR-D1lHYWlJZks5qoIwQgaJpZM4J0f39 .

rtfeldman commented 7 years ago

@tommoor FYI @variant77's fix has been merged and released as 6.1.2!