diff --git a/plug-api/lib/json.ts b/plug-api/lib/json.ts index 80f6f86a..d3a096a6 100644 --- a/plug-api/lib/json.ts +++ b/plug-api/lib/json.ts @@ -97,6 +97,13 @@ export function deepObjectMerge(a: any, b: any, reverseArrays = false): any { if (typeof a !== typeof b) { return b; } + if (a === undefined || a === null) { + return b; + } + if (b === undefined || b === null) { + return a; + } + if (typeof a === "object") { if (Array.isArray(a) && Array.isArray(b)) { if (reverseArrays) {