We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1266e17 commit e9bc2e6Copy full SHA for e9bc2e6
src/jupyter_contrib_nbextensions/nbextensions/collapsible_headings/main.js
@@ -179,6 +179,11 @@
179
// Restrict the search to cells that are of the same level and lower
180
// than the currently selected cell by index.
181
var ref_cell = _get_cell_at_index(index);
182
+ // ref_cell may be null, if we've attempted to extend selection beyond
183
+ // the existing cells
184
+ if (!ref_cell) {
185
+ return;
186
+ }
187
var pivot_level = get_cell_level(ref_cell);
188
var cells = _get_cells();
189
while (index > 0 && pivot_level > 1) {
0 commit comments