Skip to content

Commit 7051b94

Browse files
Jason LasterjasonLaster
authored andcommitted
[sync] Bug 1410820 - top-level await evaluation should be handled as regular evaluation; r=bgrins.
1 parent 23279bb commit 7051b94

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/workers/parser/mapAwaitExpression.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ export default function mapTopLevelAwait(expression: string) {
3636
const ast = hasTopLevelAwait(expression);
3737
if (ast) {
3838
const func = wrapExpression(ast);
39-
return generate(
40-
template.ast(`(${func})().then(console.log).catch(console.error);`)
41-
).code;
39+
return generate(template.ast(`(${func})();`)).code;
4240
}
4341

4442
return expression;

0 commit comments

Comments
 (0)