Throw better errors for non-iterables when Symbol doesn't exist (#11264)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
function _iterableToArray(iter) {
|
||||
if (typeof iter === 'string' || Object.prototype.toString.call(iter) === "[object Arguments]" || Symbol.iterator in Object(iter)) return Array.from(iter);
|
||||
if (typeof iter === 'string' || Object.prototype.toString.call(iter) === "[object Arguments]" || typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
||||
}
|
||||
|
||||
module.exports = _iterableToArray;
|
||||
Reference in New Issue
Block a user