Skip to content

Commit 85b5463

Browse files
committed
Fix Object.assign bug
1 parent 15da4ff commit 85b5463

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function mergeSinks(sinks: Sinks[], exceptions: MergeExceptions = {}): Si
2424

2525
const emptySinks : any = drivers
2626
.map(s => ({ [s]: [] }) as any)
27-
.reduce((acc, curr) => ({ ...acc, curr }), {});
27+
.reduce((acc, curr) => Object.assign(acc, curr ), {});
2828

2929
const combinedSinks = sinks
3030
.reduce((acc, curr) => {
@@ -50,7 +50,7 @@ export function mergeSinks(sinks: Sinks[], exceptions: MergeExceptions = {}): Si
5050
.map(([key, arr]) => ({ [key]: exceptions[key](arr) }));
5151

5252
return merged.concat(special)
53-
.reduce((acc, curr) => ({ ...acc, curr }), {});
53+
.reduce((acc, curr) => Object.assign(acc, curr), {});
5454
}
5555

5656
export interface PickMergeExceptions {
@@ -71,7 +71,7 @@ export function pickMergeSinks(driverNames: string[], exceptions: PickMergeExcep
7171
.map(key => ({ [key]: exceptions[key](instances) }));
7272

7373
return merged.concat(special)
74-
.reduce((acc, curr) => ({ ...acc, curr }), {});
74+
.reduce((acc, curr) => Object.assign(acc, curr ), {});
7575
}
7676
}
7777

0 commit comments

Comments
 (0)