Fix crashing when a nullish value exists in an object being recursed for enrichment
This commit is contained in:
parent
d3789c9069
commit
6fb50a1988
|
@ -27,6 +27,7 @@ function testObject(object) {
|
|||
module.exports.processObject = async (object, context) => {
|
||||
testObject(object)
|
||||
for (let key of Object.keys(object)) {
|
||||
if (object[key] != null) {
|
||||
let val = object[key]
|
||||
if (typeof val === "string") {
|
||||
object[key] = await module.exports.processString(object[key], context)
|
||||
|
@ -34,6 +35,7 @@ module.exports.processObject = async (object, context) => {
|
|||
object[key] = await module.exports.processObject(object[key], context)
|
||||
}
|
||||
}
|
||||
}
|
||||
return object
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue