From 013173019f1ab669f4c48bf17546a3d80332cece Mon Sep 17 00:00:00 2001 From: Anne-Catherine <57360138+accognet@users.noreply.github.com> Date: Fri, 20 Oct 2023 16:45:35 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02909=20-=20Search=20on=20Enum,=20Date,?= =?UTF-8?q?=20TagSet,...=20with=20index=20fails=20(#496)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/search/search_form_criteria.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/search/search_form_criteria.js b/js/search/search_form_criteria.js index 2dd528ef0..7a1e9e2c7 100644 --- a/js/search/search_form_criteria.js +++ b/js/search/search_form_criteria.js @@ -152,7 +152,7 @@ $(function() _initChooseDefaultOperator: function() { //if the class has an index, in order to maximize the performance, we force the default operator to "equal" - if (this.options.field.has_index && typeof this.options.available_operators['='] == 'object' && this.options.values.length == 0) + if (this.options.field.has_index && this.options.available_operators['='] != null && typeof this.options.available_operators['='] == 'object' && this.options.values.length == 0) { this.options.operator = '='; this.options.available_operators['='].rank = -1;//we want it to be the first displayed