fix iterable runtime name
This commit is contained in:
@@ -42,7 +42,7 @@ var astVisitor = {
|
||||
prop = callee.property;
|
||||
if (!isSymbolIterator(prop)) return false;
|
||||
|
||||
return t.callExpression(file.addImport(`${RUNTIME_MODULE_NAME}/core-js/get-iterable`, "getIterator", true), [callee.object]);
|
||||
return t.callExpression(file.addImport(`${RUNTIME_MODULE_NAME}/core-js/get-iterator`, "getIterator", true), [callee.object]);
|
||||
} else if (this.isBinaryExpression()) {
|
||||
// Symbol.iterator in arr -> core.$for.isIterable(arr)
|
||||
|
||||
@@ -51,7 +51,7 @@ var astVisitor = {
|
||||
var left = node.left;
|
||||
if (!isSymbolIterator(left)) return;
|
||||
|
||||
return t.callExpression(file.addImport(`${RUNTIME_MODULE_NAME}/core-js/is-iterator`, "isIterable", true), [node.right]);
|
||||
return t.callExpression(file.addImport(`${RUNTIME_MODULE_NAME}/core-js/is-iterable`, "isIterable", true), [node.right]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user