Support iterating generators in browsers without Symbol (#13129)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import _Symbol from "@babel/runtime-corejs2/core-js/symbol";
|
||||
import _isIterable from "@babel/runtime-corejs2/core-js/is-iterable";
|
||||
import _Symbol$iterator from "@babel/runtime-corejs2/core-js/symbol/iterator";
|
||||
import _Array$from from "@babel/runtime-corejs2/core-js/array/from";
|
||||
export default function _iterableToArray(iter) {
|
||||
if (typeof _Symbol !== "undefined" && _isIterable(Object(iter))) return _Array$from(iter);
|
||||
if (typeof _Symbol !== "undefined" && iter[_Symbol$iterator] != null || iter["@@iterator"] != null) return _Array$from(iter);
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
var _Symbol = require("@babel/runtime-corejs2/core-js/symbol");
|
||||
|
||||
var _isIterable = require("@babel/runtime-corejs2/core-js/is-iterable");
|
||||
var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator");
|
||||
|
||||
var _Array$from = require("@babel/runtime-corejs2/core-js/array/from");
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (typeof _Symbol !== "undefined" && _isIterable(Object(iter))) return _Array$from(iter);
|
||||
if (typeof _Symbol !== "undefined" && iter[_Symbol$iterator] != null || iter["@@iterator"] != null) return _Array$from(iter);
|
||||
}
|
||||
|
||||
module.exports = _iterableToArray;
|
||||
|
||||
Reference in New Issue
Block a user