From e878f0d72fa930522827f4f7eb7a83b01849a613 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 21 Dec 2024 09:07:34 +0800 Subject: [PATCH] fix: use replaceAll, not replace --- packages/backend/src/apps/formsg/auth/decrypt-form-response.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/apps/formsg/auth/decrypt-form-response.ts b/packages/backend/src/apps/formsg/auth/decrypt-form-response.ts index 358cb7982..7a29a3134 100644 --- a/packages/backend/src/apps/formsg/auth/decrypt-form-response.ts +++ b/packages/backend/src/apps/formsg/auth/decrypt-form-response.ts @@ -123,7 +123,7 @@ export async function decryptFormResponse( // omitted from the output. // Note: FormSG uses dot notation for field ids for MyInfo children // we replace with underscore to avoid issues when using lodash get. - parsedData[_id.replace('.', '_')] = { + parsedData[_id.replaceAll('.', '_')] = { order: index + 1, ...rest, }