Skip to content

Commit bc2265e

Browse files
authored
always b
1 parent a1bbde3 commit bc2265e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

merge objects

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function mergeObjects(a, b) {
22
if(a === null || typeof a !== 'object') return b ?? {};
3-
if(b === null || typeof b !== 'object') return a ?? {};
3+
if(b === null || typeof b !== 'object') return b ?? {};
44

55
const obj = Array.isArray(a) ? [...a] : a;
66

0 commit comments

Comments
 (0)