Closed scq closed 2 years ago
Turning on inlineHelpers
also seems to resolve it.
Similar issue here:
const foo = async function _foo(arg) {
if (arg.length === 0) {
return;
}
};
Becomes:
const foo = function _foo(arg) {
try {
if (arg.length === 0) {
return;
}
return (0, _helpers._await)();
} catch (e) {
return Promise.reject(e);
}
};
Like before, inlineHelpers
resolves it.
I can confirm the bug, last version without the bug is 0.8.13
.
Minimal repro case:
Output:
return bar()
will also reproduce it.Deleting
const foo =
(changing from a function expression to a function declaration), removing the name of the function, or returning a constant value (e.g.3
) will cause it to behave correctly.