Skip to content

Commit

Permalink
Explain why model may be missing (jupyterlab#13763)
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski authored Jan 14, 2023
1 parent 65e6171 commit 0991b41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cell-toolbar/src/celltoolbartracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export class CellToolbarTracker implements IDisposable {
}

_onActiveCellChanged(notebook: Notebook): void {
if (this._previousActiveCell?.model) {
if (this._previousActiveCell && !this._previousActiveCell.isDisposed) {
// Disposed cells do not have model anymore.
this._removeToolbar(this._previousActiveCell.model);
}

Expand Down

0 comments on commit 0991b41

Please sign in to comment.