Skip to content

Commit 41eb17c

Browse files
refactor(core): remove old Object.assign polyfill (#4157)
Object.assign has been standard since ES2015, and all runtimes we support already provide it. Removing this keeps the client code a little cleaner.
1 parent 13d51cf commit 41eb17c

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

js/main.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -735,28 +735,4 @@ const MM = (function () {
735735
};
736736
}());
737737

738-
// Add polyfill for Object.assign.
739-
if (typeof Object.assign !== "function") {
740-
(function () {
741-
Object.assign = function (target) {
742-
"use strict";
743-
if (target === undefined || target === null) {
744-
throw new TypeError("Cannot convert undefined or null to object");
745-
}
746-
const output = Object(target);
747-
for (let index = 1; index < arguments.length; index++) {
748-
const source = arguments[index];
749-
if (source !== undefined && source !== null) {
750-
for (const nextKey in source) {
751-
if (source.hasOwnProperty(nextKey)) {
752-
output[nextKey] = source[nextKey];
753-
}
754-
}
755-
}
756-
}
757-
return output;
758-
};
759-
}());
760-
}
761-
762738
MM.init();

0 commit comments

Comments
 (0)