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