We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1bbde3 commit bc2265eCopy full SHA for bc2265e
merge objects
@@ -1,6 +1,6 @@
1
function mergeObjects(a, b) {
2
if(a === null || typeof a !== 'object') return b ?? {};
3
- if(b === null || typeof b !== 'object') return a ?? {};
+ if(b === null || typeof b !== 'object') return b ?? {};
4
5
const obj = Array.isArray(a) ? [...a] : a;
6
0 commit comments