Update Object.assign non-object error message

Summary:
These are the sources, not the target. Copy pasta from above.
Closes https://github.com/facebook/react-native/pull/4989

Reviewed By: svcscm

Differential Revision: D2795198

Pulled By: spicyj

fb-gh-sync-id: 61c52add02cb877284fbf62a4344361b5bf44515
This commit is contained in:
Ben Alpert 2015-12-29 23:08:53 -08:00 committed by facebook-github-bot-4
parent dfcc4f8ad5
commit fe07a9c576
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ Object.assign = function(target, sources) {
if (typeof nextSource !== 'object' &&
typeof nextSource !== 'function') {
throw new TypeError(
'In this environment the target of assign MUST be an object.' +
'In this environment the sources for assign MUST be an object.' +
'This error is a performance optimization and not spec compliant.'
);
}
@ -54,7 +54,7 @@ Object.assign = function(target, sources) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
if (!hasOwnProperty.call(nextSource, key)) {
throw new TypeError(
'One of the sources to assign has an enumerable key on the ' +
'One of the sources for assign has an enumerable key on the ' +
'prototype chain. This is an edge case that we do not support. ' +
'This error is a performance optimization and not spec compliant.'
);