Mutate input

This commit is contained in:
Adria Navarro 2024-03-15 19:57:04 +01:00
parent b1689b38c2
commit 21a387f4fe
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,8 @@ export async function processObject<T extends Record<string, any>>(
} else if (typeof val === "object") {
parsedValue = await processObject(object[key], context, opts)
}
object = { ...object, [key]: parsedValue }
;(object as Record<string, any>)[key] = parsedValue
}
}
return object