Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-B-Wu committed Apr 3, 2024
1 parent 0a127a7 commit ad0b952
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Check failure on line 99 in apps/designer-standalone/src/app/AzureLogicAppsDesigner/Utilities/Workflow.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Assignment to function parameter 'content'

Check failure on line 99 in apps/designer-standalone/src/app/AzureLogicAppsDesigner/Utilities/Workflow.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Assignment to function parameter 'content'
}

Expand All @@ -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;
Expand Down

0 comments on commit ad0b952

Please sign in to comment.