fix corner case in inline (#5529)

fixes #5528
This commit is contained in:
Alex Lam S.L
2022-06-29 00:37:58 +01:00
committed by GitHub
parent f1b3e9df1e
commit e1b03d0235
4 changed files with 210 additions and 53 deletions

View File

@@ -2104,9 +2104,9 @@ if (require.main !== module) {
function run_code(code, toplevel, timeout) {
if (async && has_await) code = [
'"use strict";',
"(async function(){",
"(async ()=>{",
code,
"})();"
"})().catch(e=>console.log(e));",
].join("\n");
return sandbox.run_code(sandbox.patch_module_statements(code), toplevel, timeout);
}