From 333793687619cd402c922e98bdb98f5c37773623 Mon Sep 17 00:00:00 2001 From: Jordan Snow Date: Thu, 3 Oct 2024 10:57:30 -0400 Subject: [PATCH] Simplifying result packaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Signed-off-by: Jordan Snow --- plugins/catalog/src/alpha/filter/parseFilterExpression.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/catalog/src/alpha/filter/parseFilterExpression.ts b/plugins/catalog/src/alpha/filter/parseFilterExpression.ts index 71729c6a24..9775f16e51 100644 --- a/plugins/catalog/src/alpha/filter/parseFilterExpression.ts +++ b/plugins/catalog/src/alpha/filter/parseFilterExpression.ts @@ -123,11 +123,8 @@ export function splitFilterExpression( } const key = match[2]; const parameters = match[3].split(',').filter(Boolean); // silently ignore double commas - if (match[1]) { - result.push({ key, parameters, negation: true }); - } else { - result.push({ key, parameters, negation: false }); - } + const negation = Boolean(match[1]); + result.push({ key, parameters, negation }); } return result;