From 4889ded1e09ded985057f3a8e1368dbeb9242587 Mon Sep 17 00:00:00 2001 From: Filip Michalski Date: Mon, 30 Sep 2024 14:37:22 +0200 Subject: [PATCH] Extrend MandatoryParameterValidator to treat string expression with only quotes as empty value --- .../graph/node-modal/editors/expression/Formatter.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/designer/client/src/components/graph/node-modal/editors/expression/Formatter.ts b/designer/client/src/components/graph/node-modal/editors/expression/Formatter.ts index 82eee8bfee6..49a0f484e6a 100644 --- a/designer/client/src/components/graph/node-modal/editors/expression/Formatter.ts +++ b/designer/client/src/components/graph/node-modal/editors/expression/Formatter.ts @@ -29,10 +29,7 @@ const valueStartsWithQuotationMark = (value) => startsWith(value, '"') || starts const quotationMark = (value) => (valueStartsWithQuotationMark(value) ? valueQuotationMark(value) : defaultQuotationMark); export const stringSpelFormatter: Formatter = { - encode: (value) => { - if (value === "") return value; - else return quotationMark(value) + value + quotationMark(value); - }, + encode: (value) => quotationMark(value) + value + quotationMark(value), decode: (value) => value.substring(1, value.length - 1), };