Skip to content

Commit 7b4a682

Browse files
committed
make sure we don't pass undefined file
fix #175
1 parent 38d72bd commit 7b4a682

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/backend/mi2/mi2.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,10 +622,12 @@ export class MI2 extends EventEmitter implements IBackend {
622622
const func = MINode.valueOf(element, "@frame.func");
623623
const filename = MINode.valueOf(element, "@frame.file");
624624
let file: string = MINode.valueOf(element, "@frame.fullname");
625-
if (this.isSSH)
626-
file = posix.normalize(file);
627-
else
628-
file = nativePath.normalize(file);
625+
if (file) {
626+
if (this.isSSH)
627+
file = posix.normalize(file);
628+
else
629+
file = nativePath.normalize(file);
630+
}
629631

630632
let line = 0;
631633
const lnstr = MINode.valueOf(element, "@frame.line");

0 commit comments

Comments
 (0)