Run only once
This commit is contained in:
parent
623b4f5dab
commit
60dc6822cf
|
@ -105,8 +105,10 @@ export function init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We need to warp up the actual run in a `cb` function to be able to extract its value from isolated-vm
|
||||||
|
js = js.replace(/run\(\);$/, "cb(run());")
|
||||||
const script = jsIsolate.compileModuleSync(
|
const script = jsIsolate.compileModuleSync(
|
||||||
`import helpers from "compiled_module";${js};cb(run());`,
|
`import helpers from "compiled_module";${js}`,
|
||||||
{}
|
{}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue