Browse Source

[fix] searx.js null pointer exception when category div is missing

MrPaulBlack 3 years ago
parent
commit
79351c2e4d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/static/themes/simple/src/js/main/searx_search.js

+ 1 - 1
searx/static/themes/simple/src/js/main/searx_search.js

@@ -96,7 +96,7 @@
     }
 
     // vanilla js version of search_on_category_select.js
-    if (qinput !== null && searx.search_on_category_select) {
+    if (qinput !== null && d.querySelector('.help') != null && searx.search_on_category_select) {
       d.querySelector('.help').className='invisible';
 
       searx.on('#categories input', 'change', function() {