Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/spaces1
Conflicts: src/utils/objects.ts
This commit is contained in:
commit
0f0edbfb14
45 changed files with 2606 additions and 675 deletions
|
@ -90,8 +90,10 @@ export function objectHasDiff<O extends {}>(a: O, b: O): boolean {
|
|||
const aKeys = Object.keys(a);
|
||||
const bKeys = Object.keys(b);
|
||||
if (aKeys.length !== bKeys.length) return true;
|
||||
|
||||
const possibleChanges = arrayUnion(aKeys, bKeys);
|
||||
// if the amalgamation of both sets of keys has the a different length to the inputs then there must be a change
|
||||
if (possibleChanges.length !== aKeys.length) return true;
|
||||
|
||||
return possibleChanges.some(k => a[k] !== b[k]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue