fix undefined searchBar bug

This commit is contained in:
Lawrence Hook
2023-08-31 17:37:58 -04:00
parent c6b1319d0f
commit 8e86fe209b
+1 -1
View File
@@ -597,7 +597,7 @@ function handleNewPage() {
// Autofocus the search bar
if (on && !onVideo && (cache['autofocus_search'] || cache['search_engine_mode'])) {
const searchBar = qs('input#search');
if (!searchBar.value) {
if (searchBar && !searchBar.value) {
searchBar?.focus();
}
}