This commit is contained in:
Adria Navarro 2024-03-15 20:12:41 +01:00
parent a78485e325
commit e34f24e2f1
1 changed files with 3 additions and 1 deletions

View File

@ -90,6 +90,7 @@ export async function processObject<T extends Record<string, any>>(
opts?: { noHelpers?: boolean; escapeNewlines?: boolean; onlyFound?: boolean }
): Promise<T> {
testObject(object)
for (const key of Object.keys(object || {})) {
if (object[key] != null) {
const val = object[key]
@ -100,7 +101,8 @@ export async function processObject<T extends Record<string, any>>(
parsedValue = await processObject(object[key], context, opts)
}
(object as Record<string, any>)[key] = parsedValue
// @ts-ignore
object[key] = parsedValue
}
}
return object