http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
Per July 29 2014 resolution, Object.assign should treat null and undefined as "empty"
Updated and published in https://github.com/ljharb/object.assign/releases/tag/v0.5.0 and https://github.com/paulmillr/es6-shim/releases/tag/0.15.0
that's not what the meeting minutes day https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-07/jul-29.md#48-consider-if-objectassign-should-silently-ignore-nullundefined-sources
Conclusion/Resolution
do not throw on undefined
will throw on null
I copied the wrong Conclusion/Resolution.
This is the correction:
https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-07/jul-29.md#revisit-objectassign
Overriding previous resolution:
- Object.assign does not throw on null or undefined
- Adhere to the guiding principle stated above
Just to clarify: a null/undefined `target` should throw, but null/undefined `sources` should not throw (and be treated as empty)?
(In reply to Jordan Harband from comment #4)
> Just to clarify: a null/undefined `target` should throw, but null/undefined
> `sources` should not throw (and be treated as empty)?
Right, this change only applies to sources
fixed in rev27 editor's draft
fixed in rev27 draft