emmanueltouzery / prelude-ts

Functional programming, immutable collections and FP constructs for typescript and javascript
ISC License
377 stars 21 forks source link

Error calling .map() on an empty Vector #14

Closed bwbuchanan closed 6 years ago

bwbuchanan commented 6 years ago

In 0.7.11, if you call .map on an empty Vector, you get:

TypeError: Cannot read property '0' of undefined
  at Vector.map (node_modules/prelude.ts/src/Vector.ts:840:48)

This works fine in master though.

emmanueltouzery commented 6 years ago

Huh :-(

sorry again. I released 0.7.12 with a fix for that now, added a test for that on master too so it doesn't happen again. The reason master is not affected is because it uses an external library for the vector but there's an unresolved bug in that library for now, so the stable branch must stick to the internal vector for now.