fix(rest-spread): Do not require Symbol.iterator for strings (#9794)
This commit is contained in:
@@ -3,7 +3,7 @@ var _Array$from = require("../core-js/array/from");
|
||||
var _isIterable = require("../core-js/is-iterable");
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (_isIterable(Object(iter)) || Object.prototype.toString.call(iter) === "[object Arguments]") return _Array$from(iter);
|
||||
if (typeof iter === 'string' || Object.prototype.toString.call(iter) === "[object Arguments]" || _isIterable(Object(iter))) return _Array$from(iter);
|
||||
}
|
||||
|
||||
module.exports = _iterableToArray;
|
||||
Reference in New Issue
Block a user