parent
9756518080
commit
ef542c34cc
7 changed files with 53 additions and 8 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,20 @@ |
|||||||
|
if (typeof Object.assign != 'function') { |
||||||
|
Object.assign = function(target) { |
||||||
|
'use strict'; |
||||||
|
if (target == null) { |
||||||
|
throw new TypeError('Cannot convert undefined or null to object'); |
||||||
|
} |
||||||
|
target = Object(target); |
||||||
|
for (var index = 1; index < arguments.length; index++) { |
||||||
|
var source = arguments[index]; |
||||||
|
if (source != null) { |
||||||
|
for (var key in source) { |
||||||
|
if (Object.prototype.hasOwnProperty.call(source, key)) { |
||||||
|
target[key] = source[key]; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return target; |
||||||
|
}; |
||||||
|
} |
||||||
Loading…
Reference in new issue