Fix helpers.unsupportedIterableToArray for Map and Set (#11495)
Fixes #11494
This commit is contained in:
@@ -1044,7 +1044,7 @@ helpers.unsupportedIterableToArray = helper("7.9.0")`
|
||||
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
||||
if (n === "Map" || n === "Set") return Array.from(n);
|
||||
if (n === "Map" || n === "Set") return Array.from(o);
|
||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
||||
return arrayLikeToArray(o, minLen);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user