Skip to content

Commit

Permalink
Allow coreJS Symbol to be type object
Browse files Browse the repository at this point in the history
  • Loading branch information
conartist6 committed Mar 23, 2019
1 parent 419d805 commit 8ce14ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/babel-helpers/src/helpers.js
Expand Up @@ -78,9 +78,10 @@ helpers.jsx = helper("7.0.0-beta.0")`
`;

helpers.asyncIterator = helper("7.0.0-beta.0")`
const symbolTypes = ["function", "object"];
export default function _asyncIterator(iterable) {
var method
if (typeof Symbol === "function") {
if (symbolTypes.includes(typeof Symbol)) {
if (Symbol.asyncIterator) {
method = iterable[Symbol.asyncIterator]
if (method != null) return method.call(iterable);
Expand Down

0 comments on commit 8ce14ca

Please sign in to comment.