From 0ca8ae944cf413fd140bb7b4828f7111247a92cf Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Mon, 11 May 2020 22:13:31 +0800 Subject: [PATCH] feat: ignore if trace.fileName is empty Signed-off-by: MiaoWoo --- packages/api/src/console.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/src/console.ts b/packages/api/src/console.ts index 3969d99b..4a610223 100644 --- a/packages/api/src/console.ts +++ b/packages/api/src/console.ts @@ -136,7 +136,7 @@ export class MiaoScriptConsole implements Console { stack = Arrays.asList(stack) } stack.forEach(trace => { - if (trace.fileName.startsWith('jar:file:')) { return } + if (!trace.fileName || trace.fileName.startsWith('jar:file:')) { return } if (trace.className.startsWith('<')) { let { fileName, lineNumber } = this.readSourceMap(trace.fileName, trace.lineNumber) if (fileName.startsWith(root)) { fileName = fileName.split(root)[1] }