Prevent JS error in multiple section search
This commit is contained in:
parent
4c11c8324e
commit
ddd03eab1d
|
@ -138,7 +138,7 @@ function createSectionsEditor({style, onTitleChanged}) {
|
||||||
if (index >= 0 && distances[index] !== undefined) {
|
if (index >= 0 && distances[index] !== undefined) {
|
||||||
return distances[index];
|
return distances[index];
|
||||||
}
|
}
|
||||||
const section = cm.display.wrapper.closest('.section');
|
const section = cm && cm.display.wrapper.closest('.section');
|
||||||
if (!section) {
|
if (!section) {
|
||||||
return 1e9;
|
return 1e9;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user