Prevent JS error in multiple section search

This commit is contained in:
Rob Garrison 2018-12-19 07:09:16 -06:00
parent 4c11c8324e
commit ddd03eab1d

View File

@ -138,7 +138,7 @@ function createSectionsEditor({style, onTitleChanged}) {
if (index >= 0 && distances[index] !== undefined) {
return distances[index];
}
const section = cm.display.wrapper.closest('.section');
const section = cm && cm.display.wrapper.closest('.section');
if (!section) {
return 1e9;
}