1 parent 4f6e6f0 commit 0835af6Copy full SHA for 0835af6
1 file changed
src/utilities-data.ts
@@ -11,7 +11,8 @@ export function getIntersection<T>(items: T[][] = []): T[] {
11
return firstItem;
12
}
13
return otherItems.reduce((accumulator, currentValue) => {
14
- return accumulator.filter((item) => currentValue.includes(item));
+ const currentSet = new Set(currentValue);
15
+ return accumulator.filter((item) => currentSet.has(item));
16
}, firstItem);
17
18
0 commit comments