1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-14 18:46: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,8 +342,10 @@ runBtn, searchInput
} else { } else {
searchInput.value = ''; searchInput.value = '';
// Give last focused editor, focus again // Give last focused editor, focus again
if (editorWithFocus) {
editorWithFocus.focus(); editorWithFocus.focus();
} }
}
document.body.classList[isSavedItemsPaneOpen ? 'add' : 'remove']('overlay-visible'); document.body.classList[isSavedItemsPaneOpen ? 'add' : 'remove']('overlay-visible');
} }