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

use isArray when type checking #147

Closed variant77 closed 7 years ago

variant77 commented 8 years ago

This PR fixed #146

I traced the problem to an erroneous return value of instanceof Array . for some reason in my setup it returns false. According to the MDN docs this can happen in multiple context scenarios and it is advised to use Array.isArray instead.

variant77 commented 7 years ago

@rtfeldman I'd love to get your input on this PR

rtfeldman commented 7 years ago

Looks good! So sorry for the delay in merging this @variant77!

brunolemos commented 7 years ago

@rtfeldman please update the npm package :)

rtfeldman commented 7 years ago

Released as 6.1.2 @brunolemos @variant77