mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
NETSCRIPT: Compiled modules will be even more shared (#468)
This commit is contained in:
@@ -251,9 +251,7 @@ function makeRuntimeErrorMsg(ctx: NetscriptContext, msg: string, type = "RUNTIME
|
||||
const userstack = [];
|
||||
for (const stackline of stack) {
|
||||
const filename = (() => {
|
||||
// Filename is current file if url found
|
||||
if (ws.scriptRef.url && stackline.includes(ws.scriptRef.url)) return ws.scriptRef.filename;
|
||||
// Also check urls for dependencies
|
||||
// Check urls for dependencies
|
||||
for (const [url, script] of ws.scriptRef.dependencies) if (stackline.includes(url)) return script.filename;
|
||||
// Check for filenames directly if no URL found
|
||||
if (stackline.includes(ws.scriptRef.filename)) return ws.scriptRef.filename;
|
||||
|
||||
Reference in New Issue
Block a user