diff --git a/searx/static/js/search_on_category_select.js b/searx/static/js/search_on_category_select.js index 6156ca4e8..990211690 100644 --- a/searx/static/js/search_on_category_select.js +++ b/searx/static/js/search_on_category_select.js @@ -1,5 +1,5 @@ $(document).ready(function() { - if($('#q')) { + if($('#q').length) { $('#categories label').click(function(e) { $('#categories input[type="checkbox"]').each(function(i, checkbox) { $(checkbox).prop('checked', false);