From f79f6713b0ce825d3b3faf93a61581bba74163b7 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Wed, 27 May 2015 22:43:49 +0200 Subject: [PATCH] [fix] do not use category select js if there is no search query field on the page --- searx/static/js/search_on_category_select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);