From acdfda4cf04bc70b6967b4447fece70df4375f86 Mon Sep 17 00:00:00 2001 From: Gcaufy Date: Fri, 21 Sep 2018 10:13:54 +0800 Subject: [PATCH] fix(babel-plugin-import-regenerator): fixed regenerator mutiple async bug --- packages/babel-plugin-import-regenerator/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/babel-plugin-import-regenerator/index.js b/packages/babel-plugin-import-regenerator/index.js index 35892d519..6af19d0f0 100644 --- a/packages/babel-plugin-import-regenerator/index.js +++ b/packages/babel-plugin-import-regenerator/index.js @@ -5,6 +5,9 @@ let importedName; exports = module.exports = ({types: t}) => { return { visitor: { + Program (path) { + importedName = ''; + }, CallExpression (path, file) { let callee = path.get('callee'); if (callee.node && callee.node.object && callee.node.property) {