From 4b15de246db04bf57371ff600e4778d4f9f08402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Delafontaine?= Date: Mon, 22 Apr 2024 17:32:20 +0200 Subject: [PATCH] THE-1268 FIX erreur quand recherche avancee premier champ vide --- components/theses/search/AdvancedForm.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/theses/search/AdvancedForm.vue b/components/theses/search/AdvancedForm.vue index 94d43162..56cf73b8 100644 --- a/components/theses/search/AdvancedForm.vue +++ b/components/theses/search/AdvancedForm.vue @@ -175,6 +175,7 @@ function objectToQuery() { let result = ""; formFields.value.forEach((field, index) => { + try { field.value = field.value.replace(":", "\\:") if (field.value === "") { result += " "; @@ -199,6 +200,8 @@ function objectToQuery() { result += ` ${operator.value}`; } } + } catch(error) { + } }); return deleteEndOperator(result.replaceAll('status:(accessible)', 'accessible:oui').replaceAll('sujetsLibelle', '(sujetsLibelle').trim());