Fix bug in helper processing.
This commit is contained in:
parent
d159c468b2
commit
a1c268667a
@ -17,5 +17,5 @@
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
babelHelpers.createClass = _createClass
|
||||
babelHelpers.createClass = _createClass;
|
||||
})(typeof global === "undefined" ? self : global);
|
||||
|
||||
@ -157,10 +157,14 @@ function permuteHelperAST(file, metadata, id, localBindings) {
|
||||
exp.replaceWith(decl);
|
||||
path.pushContainer(
|
||||
"body",
|
||||
t.assignmentExpression("=", id, t.identifier(exportName)),
|
||||
t.expressionStatement(
|
||||
t.assignmentExpression("=", id, t.identifier(exportName)),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
exp.replaceWith(t.assignmentExpression("=", id, decl.node));
|
||||
exp.replaceWith(
|
||||
t.expressionStatement(t.assignmentExpression("=", id, decl.node)),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
throw new Error("Unexpected helper format.");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user