From 8bf11f7cd69e8054aeb55430215bf062a2305ce6 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 19 Sep 2018 13:53:17 +0200 Subject: Fix inappropriate recopy in criteria search (refs #4243) --- ishtar_common/static/js/ishtar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ishtar_common/static/js') diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 936ce4f11..5812dfd40 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -655,7 +655,7 @@ function update_search_field(){ } if (v == "") return; var term = get_label_from_input(item_for_label); - if(!term) return; + if(!term || typeof term == "undefined") return; if (query) query += " "; query += term + '="' + v + '"'; } @@ -668,6 +668,8 @@ function update_search_field(){ if(item_for_label.filter('optgroup').length){ item_for_label = item_for_label.parent(); } + var term = get_label_from_input(item_for_label); + if(!term || typeof term == "undefined") return; if (query) query += " "; query += get_label_from_input(item_for_label) + '="' + $(this).text() + '"'; -- cgit v1.2.3