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), };