Skip to content

Commit

Permalink
Remove the non-null assertion on IDebugger.ISources
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Aug 31, 2021
1 parent 58bef87 commit 7ffde0b
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/debugger/src/service.ts
Expand Up @@ -469,15 +469,17 @@ export class DebuggerService implements IDebugger, IDisposable {
getDebuggerState(): IDebugger.State {
const breakpoints = this._model.breakpoints.breakpoints;
let cells: string[] = [];
for (const id of breakpoints.keys()) {
const editorList = this._debuggerSources!.find({
focus: false,
kernel: this.session?.connection?.kernel?.name ?? '',
path: this._session?.connection?.path ?? '',
source: id
});
const tmpCells = editorList.map(e => e.model.value.text);
cells = cells.concat(tmpCells);
if (this._debuggerSources) {
for (const id of breakpoints.keys()) {
const editorList = this._debuggerSources.find({
focus: false,
kernel: this.session?.connection?.kernel?.name ?? '',
path: this._session?.connection?.path ?? '',
source: id
});
const tmpCells = editorList.map(e => e.model.value.text);
cells = cells.concat(tmpCells);
}
}
return { cells, breakpoints };
}
Expand Down

0 comments on commit 7ffde0b

Please sign in to comment.