From 21a387f4fed7cf78711ccee1585223412ceb6be2 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 15 Mar 2024 19:57:04 +0100 Subject: [PATCH] Mutate input --- packages/string-templates/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/string-templates/src/index.ts b/packages/string-templates/src/index.ts index 7864f3196e..5bbc6b65eb 100644 --- a/packages/string-templates/src/index.ts +++ b/packages/string-templates/src/index.ts @@ -99,7 +99,8 @@ export async function processObject>( } else if (typeof val === "object") { parsedValue = await processObject(object[key], context, opts) } - object = { ...object, [key]: parsedValue } + + ;(object as Record)[key] = parsedValue } } return object