1 | (function () {
|
2 | if (typeof Object.assign != 'function') {
|
3 | Object.assign = function(target, varArgs) {
|
4 | 'use strict';
|
5 | if (target == null) {
|
6 | throw new TypeError('Cannot convert undefined or null to object');
|
7 | }
|
8 |
|
9 | var to = Object(target);
|
10 |
|
11 | for (var index = 1; index < arguments.length; index++) {
|
12 | var nextSource = arguments[index];
|
13 |
|
14 | if (nextSource != null) {
|
15 | for (var nextKey in nextSource) {
|
16 |
|
17 | if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
18 | to[nextKey] = nextSource[nextKey];
|
19 | }
|
20 | }
|
21 | }
|
22 | }
|
23 | return to;
|
24 | };
|
25 | }
|
26 | })();
|