Support iterating generators in browsers without Symbol (#13129)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
function _iterableToArray(iter) {
|
||||
if (typeof Symbol !== "undefined" && Symbol.iterator in 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