mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
Update script.module immediately, so we avoid accidentally evaling the same module several times
This commit is contained in:
committed by
danielyxie
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user