From 3f4019b928e7b425b34d11a4d7d4324fecacf954 Mon Sep 17 00:00:00 2001 From: Olli Mannevaara Date: Thu, 7 Mar 2024 14:01:19 +0200 Subject: [PATCH] Fix the unnecessary splitting of keywords --- .../results/publications2/publications2.component.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/portal/components/results/publications2/publications2.component.ts b/src/app/portal/components/results/publications2/publications2.component.ts index f95adfec0..3f411dde1 100644 --- a/src/app/portal/components/results/publications2/publications2.component.ts +++ b/src/app/portal/components/results/publications2/publications2.component.ts @@ -629,8 +629,15 @@ function splitFields(obj: Record): Record = {}; for (const key in obj) { - const value = obj[key]; - result[key] = splitParams(value); + // console log key and value + // console.log(key, obj[key]); + + if (key === 'q') { + result[key] = [obj[key] as string]; + } else { + const value = obj[key]; + result[key] = splitParams(value); + } } return result;