Ensure processObjectSync does not throw.
This commit is contained in:
parent
c2358a6d6d
commit
2e4607edb6
|
@ -179,7 +179,11 @@ export function processObjectSync(
|
||||||
for (let key of Object.keys(object || {})) {
|
for (let key of Object.keys(object || {})) {
|
||||||
let val = object[key]
|
let val = object[key]
|
||||||
if (typeof val === "string") {
|
if (typeof val === "string") {
|
||||||
object[key] = processStringSync(object[key], context, opts)
|
try {
|
||||||
|
object[key] = processStringSync(object[key], context, opts)
|
||||||
|
} catch (error: any) {
|
||||||
|
object[key] = error.toString()
|
||||||
|
}
|
||||||
} else if (typeof val === "object") {
|
} else if (typeof val === "object") {
|
||||||
object[key] = processObjectSync(object[key], context, opts)
|
object[key] = processObjectSync(object[key], context, opts)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue