You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Ensure arrayHasDiff returns a boolean
This is just maintenance noticed while debugging.
This commit is contained in:
@@ -53,6 +53,9 @@ export function arrayHasDiff(a: any[], b: any[]): boolean {
|
|||||||
// an element from the other.
|
// an element from the other.
|
||||||
if (b.some(i => !a.includes(i))) return true;
|
if (b.some(i => !a.includes(i))) return true;
|
||||||
if (a.some(i => !b.includes(i))) return true;
|
if (a.some(i => !b.includes(i))) return true;
|
||||||
|
|
||||||
|
// if all the keys are common, say so
|
||||||
|
return false
|
||||||
} else {
|
} else {
|
||||||
return true; // different lengths means they are naturally diverged
|
return true; // different lengths means they are naturally diverged
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user