Skip to content

Commit 8e87fc4

Browse files
authored
fix(refactor): Breakpoints list in map type can't be undefined. (#286)
1 parent a7e542f commit 8e87fc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class Session extends DebugSession {
131131
private _sourceFileWatcher?: FileSystemWatcher;
132132
private _activeThreadId: number = 0; // the one being debugged
133133
private _localRoot: string = '';
134-
private _sourceBreakpointsMap: Map<string, DebugProtocol.SourceBreakpoint[] | undefined> = new Map();
134+
private _sourceBreakpointsMap: Map<string, DebugProtocol.SourceBreakpoint[]> = new Map();
135135
private _sourceMapRoot?: string;
136136
private _generatedSourceRoot?: string;
137137
private _inlineSourceMap: boolean = false;
@@ -350,7 +350,7 @@ export class Session extends DebugSession {
350350
}
351351

352352
// store source breakpoints per file
353-
this._sourceBreakpointsMap.set(args.source.path, args.breakpoints);
353+
this._sourceBreakpointsMap.set(args.source.path, args.breakpoints ?? []);
354354

355355
// rebuild the generated breakpoints map each time a breakpoint is changed in any file
356356
let generatedBreakpointsMap: Map<string, DebugProtocol.SourceBreakpoint[]> = new Map();

0 commit comments

Comments
 (0)