Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Minor improvements to filtering performance #5054

Merged
merged 10 commits into from
Jul 28, 2020
3 changes: 3 additions & 0 deletions src/utils/arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export function arrayHasDiff(a: any[], b: any[]): boolean {
// an element from the other.
if (b.some(i => !a.includes(i))) return true;
if (a.some(i => !b.includes(i))) return true;

// if all the keys are common, say so
return false
turt2live marked this conversation as resolved.
Show resolved Hide resolved
} else {
return true; // different lengths means they are naturally diverged
}
Expand Down