export function mergeObjects(a, b) { if (a && !b) { return a; } if (!a && b) { return b; } if (a || b) { return { ...a, ...b }; } return undefined; }