Skip to content

Commit

Permalink
Merge pull request #238 from tejaede/bugs/symbol-ie11
Browse files Browse the repository at this point in the history
Adjust Symbol null check in shim-array
  • Loading branch information
marchant authored Apr 15, 2020
2 parents e3a889e + bfda0f6 commit 97e3536
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shim-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ if (Object.freeze) {

Array.nativeFrom = Array.from;

var isSymbolDefined = typeof Symbol !== "undefined";
Array.from = function (values, mapFn, thisArg) {
if(Symbol && values && typeof values[Symbol.iterator] === "function") {
if (isSymbolDefined && values && typeof values[Symbol.iterator] === "function") {
return Array.nativeFrom(values, mapFn, thisArg);
}
//Now we add support for values that implement forEach:
Expand Down

0 comments on commit 97e3536

Please sign in to comment.