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