Open
Description
Due to the while
conditional in object.merge, there is a nasty edge-case which is about null or undefined in object.merge:
merge({}, null, {foo: 'bar'}) ==> {}
merge({}, {foo: 'bar'}, null) ==> {foo: 'bar'}
Which is counter-intuitive on how it is on Object.assign
:
Object.assign({}, null, {foo: 'bar'}) ==> {foo: 'bar'}
Object.assign({}, {foo: 'bar'}, null) ==> {foo: 'bar'}
The same problems exist for undefined
instead of null
.
Metadata
Metadata
Assignees
Labels
No labels