Throw better errors for non-iterables when Symbol doesn't exist (#11264)
This commit is contained in:
@@ -2,8 +2,10 @@ var _Array$from = require("../core-js/array/from");
|
||||
|
||||
var _isIterable = require("../core-js/is-iterable");
|
||||
|
||||
var _Symbol = require("../core-js/symbol");
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (typeof iter === 'string' || Object.prototype.toString.call(iter) === "[object Arguments]" || _isIterable(Object(iter))) return _Array$from(iter);
|
||||
if (typeof iter === 'string' || Object.prototype.toString.call(iter) === "[object Arguments]" || typeof _Symbol !== "undefined" && _isIterable(Object(iter))) return _Array$from(iter);
|
||||
}
|
||||
|
||||
module.exports = _iterableToArray;
|
||||
Reference in New Issue
Block a user