make babel-helper-remap-async-to-generator bc with babel 6.15 and lower (#4603)
This commit is contained in:
committed by
Henry Zhu
parent
682e9658c9
commit
5a1984aa41
@@ -152,6 +152,11 @@ function plainFunction(path: NodePath, callId: Object) {
|
||||
}
|
||||
|
||||
export default function (path: NodePath, file: Object, helpers: Object) {
|
||||
if (!helpers) {
|
||||
// bc for 6.15 and earlier
|
||||
helpers = { wrapAsync: file };
|
||||
file = null;
|
||||
}
|
||||
path.traverse(awaitVisitor, {
|
||||
file,
|
||||
wrapAwait: helpers.wrapAwait
|
||||
|
||||
Reference in New Issue
Block a user