Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatMap (and possibly others) sends strings for index #36

Closed
rtfeldman opened this issue May 6, 2015 · 1 comment
Closed

flatMap (and possibly others) sends strings for index #36

rtfeldman opened this issue May 6, 2015 · 1 comment
Labels

Comments

@rtfeldman
Copy link
Owner

Immutable(["foo", "bar"]).flatMap(function(val, index) {
  return "index is " + index + " aaaand its type is " + (typeof index);
});

// [ 'index is 0 aaaand its type is string', 'index is 1 aaaand its type is string' ]

The offending line of code: https://github.com/rtfeldman/seamless-immutable/blob/master/src/seamless-immutable.js#L124

Evidence suggests that second argument needs to be parseInt(key) which is absolutely gobsmacking.

@rtfeldman
Copy link
Owner Author

This is now fixed more efficiently by af6a8df

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

No branches or pull requests

1 participant