Skip to content

Commit

Permalink
fix(refactor): Breakpoints list in map type can't be undefined. (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
chmeyer-ms authored Jan 28, 2025
1 parent a7e542f commit 8e87fc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class Session extends DebugSession {
private _sourceFileWatcher?: FileSystemWatcher;
private _activeThreadId: number = 0; // the one being debugged
private _localRoot: string = '';
private _sourceBreakpointsMap: Map<string, DebugProtocol.SourceBreakpoint[] | undefined> = new Map();
private _sourceBreakpointsMap: Map<string, DebugProtocol.SourceBreakpoint[]> = new Map();
private _sourceMapRoot?: string;
private _generatedSourceRoot?: string;
private _inlineSourceMap: boolean = false;
Expand Down Expand Up @@ -350,7 +350,7 @@ export class Session extends DebugSession {
}

// store source breakpoints per file
this._sourceBreakpointsMap.set(args.source.path, args.breakpoints);
this._sourceBreakpointsMap.set(args.source.path, args.breakpoints ?? []);

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

0 comments on commit 8e87fc4

Please sign in to comment.