mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Ensure arrayHasDiff returns a boolean
This is just maintenance noticed while debugging.
This commit is contained in:
parent
51592ccfb6
commit
5f034ee4ed
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue