1
0
Fork 0
mirror of synced 2024-10-05 04:25:21 +13:00

Ensure processObjectSync does not throw.

This commit is contained in:
Sam Rose 2024-10-04 11:13:30 +01:00
parent c2358a6d6d
commit 2e4607edb6
No known key found for this signature in database

View file

@ -179,7 +179,11 @@ export function processObjectSync(
for (let key of Object.keys(object || {})) {
let val = object[key]
if (typeof val === "string") {
try {
object[key] = processStringSync(object[key], context, opts)
} catch (error: any) {
object[key] = error.toString()
}
} else if (typeof val === "object") {
object[key] = processObjectSync(object[key], context, opts)
}