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.
|
||||
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
|
||||
} else {
|
||||
return true; // different lengths means they are naturally diverged
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue