Skip to content

Commit

Permalink
Tentative fix for Maximum call stack size exceeded issue
Browse files Browse the repository at this point in the history
  • Loading branch information
marchant authored Mar 1, 2021
1 parent f73d513 commit 85f00f8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions shim-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ module.exports = Array;
var array_splice = Array.prototype.splice;
var array_slice = Array.prototype.slice;

Array.empty = [];
if (!Array.empty) {
Array.empty = [];

if (Object.freeze) {
Object.freeze(Array.empty);
if (Object.freeze) {
Object.freeze(Array.empty);
}
}

Array.nativeFrom = Array.from;
if(!Array.nativeFrom ) {
Array.nativeFrom = Array.from;
}

var isSymbolDefined = typeof Symbol !== "undefined";
Array.from = function (values, mapFn, thisArg) {
Expand Down

0 comments on commit 85f00f8

Please sign in to comment.