fix(rest-spread): Do not require Symbol.iterator for strings (#9794)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import _Array$from from "../../core-js/array/from";
|
||||
import _isIterable from "../../core-js/is-iterable";
|
||||
export default 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);
|
||||
}
|
||||
Reference in New Issue
Block a user