mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 14:13:48 +01:00
Update script.module immediately, so we avoid accidentally evaling the same module several times
This commit is contained in:
parent
c485fdfa87
commit
eecb0c0f01
@ -26,9 +26,9 @@ export async function executeJSScript(scripts = [], workerScript) {
|
||||
// load fully dynamic content. So we hide the import from webpack
|
||||
// by placing it inside an eval call.
|
||||
urlStack = _getScriptUrls(script, scripts, []);
|
||||
script.module = await eval('import(urlStack[urlStack.length - 1])');
|
||||
script.module = new Promise(resolve => resolve(eval('import(urlStack[urlStack.length - 1])')));
|
||||
}
|
||||
loadedModule = script.module;
|
||||
loadedModule = await script.module;
|
||||
|
||||
let ns = workerScript.env.vars;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user