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

TypeError with unflatten when destination property is null #25

Closed
A opened this issue Feb 26, 2015 · 2 comments
Closed

TypeError with unflatten when destination property is null #25

A opened this issue Feb 26, 2015 · 2 comments

Comments

@A
Copy link

A commented Feb 26, 2015

// ok
flat.unflatten({ 'a.b': 'c' }); // { a: { b: 'c' } }
// not ok
flat.unflatten({ a: null, 'a.b': 'c' }); // TypeError: Cannot set property 'b' of null

Probably, it happens because of 'object' === typeof null, but I didn't see the source

@timoxley
Copy link
Contributor

Released in 2.0.0. I've bumped major on this because the behaviour around overwriting non-object values is changed from 1.x.

@A
Copy link
Author

A commented Jan 31, 2016

Thank you)

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

No branches or pull requests

2 participants