You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is only one cell in the notebook and it gets removed (which is a bit pathological edge case) an error is thrown:
TypeError: Cannot read property 'model' of undefined
at Mt.activeCellChanged (237.a21e094affef50264d99.js:formatted:4176)
at m (jlab_core.61e1fcd0f32a80614a78.js:2)
at Object.l [as emit] (jlab_core.61e1fcd0f32a80614a78.js:2)
at e.emit (jlab_core.61e1fcd0f32a80614a78.js:2)
at ne.set activeCellIndex [as activeCellIndex] (jlab_core.61e1fcd0f32a80614a78.js:2)
at ne.onCellRemoved (jlab_core.61e1fcd0f32a80614a78.js:2)
at ne._removeCell (jlab_core.61e1fcd0f32a80614a78.js:2)
at jlab_core.61e1fcd0f32a80614a78.js:2
at c (jlab_core.61e1fcd0f32a80614a78.js:2)
at ne._onCellsChanged (jlab_core.61e1fcd0f32a80614a78.js:2)
Users previously complained about uncaught errors (#543 and a few earlier) and it would be nice to handle this one too.
The important use case is when selecting all cells and removing all of them to clear notebook as the only cells gets removed too.
Importantly the removed cells is immediately re-added by the model (a notebook has to have at least one cell) but we are fast and apparently can get into this strange state of the model when cell was already removed but not yet re-added.
Reproduce
Open new notebook
Press esc followed by dd (d twice)
See error in console
Expected behavior
Be nice, do not throw errors.
Context
JupyterLab version: 3.0.7
Lab extension 3.4.1
The text was updated successfully, but these errors were encountered:
Description
If there is only one cell in the notebook and it gets removed (which is a bit pathological edge case) an error is thrown:
Users previously complained about uncaught errors (#543 and a few earlier) and it would be nice to handle this one too.
The important use case is when selecting all cells and removing all of them to clear notebook as the only cells gets removed too.
Importantly the removed cells is immediately re-added by the model (a notebook has to have at least one cell) but we are fast and apparently can get into this strange state of the model when cell was already removed but not yet re-added.
Reproduce
esc
followed bydd
(d
twice)Expected behavior
Be nice, do not throw errors.
Context
The text was updated successfully, but these errors were encountered: