From ad0b952d16fb4a5fd6b475d2400a1c12568944b4 Mon Sep 17 00:00:00 2001 From: Eric-B-Wu Date: Wed, 3 Apr 2024 14:13:52 -0400 Subject: [PATCH] fix issue --- .../src/app/AzureLogicAppsDesigner/Utilities/Workflow.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/designer-standalone/src/app/AzureLogicAppsDesigner/Utilities/Workflow.ts b/apps/designer-standalone/src/app/AzureLogicAppsDesigner/Utilities/Workflow.ts index 22742a5e566..52b5d9d1982 100644 --- a/apps/designer-standalone/src/app/AzureLogicAppsDesigner/Utilities/Workflow.ts +++ b/apps/designer-standalone/src/app/AzureLogicAppsDesigner/Utilities/Workflow.ts @@ -96,7 +96,6 @@ function replaceAllOccurrences(content: string, searchValue: string, value: any) replaceIfFoundAndVerifyJson(content, searchValue, `${value}`) ?? content.replace(searchValue, ''); - // eslint-disable-next-line no-param-reassign content = tempResult; } @@ -108,7 +107,10 @@ function replaceIfFoundAndVerifyJson(stringifiedJson: string, searchValue: strin return undefined; } - const result = stringifiedJson.replace(searchValue, value); + const result = stringifiedJson.replace(searchValue, function () { + return value; + }); + try { JSON.parse(result); return result;