1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-14 10:36:19 +02:00

add check on editorWithFocus before using it.

This commit is contained in:
Kushagra Gour
2017-04-30 20:38:23 +05:30
parent badf7af894
commit 35feba9692

View File

@ -342,7 +342,9 @@ runBtn, searchInput
} else { } else {
searchInput.value = ''; searchInput.value = '';
// Give last focused editor, focus again // Give last focused editor, focus again
editorWithFocus.focus(); if (editorWithFocus) {
editorWithFocus.focus();
}
} }
document.body.classList[isSavedItemsPaneOpen ? 'add' : 'remove']('overlay-visible'); document.body.classList[isSavedItemsPaneOpen ? 'add' : 'remove']('overlay-visible');
} }