Revert "Merge pull request #193 from matrix-org/rav/shouldComponentUpdates"
This reverts commita7c75b1315
, reversing changes made tob66ca74ede
. This is causing breakage in the messagepanel screen resize after video call and room settings
This commit is contained in:
parent
a2c6bd0e6c
commit
606fdcb8df
3 changed files with 0 additions and 43 deletions
|
@ -77,34 +77,3 @@ module.exports.getKeyValueArrayDiffs = function(before, after) {
|
|||
|
||||
return results;
|
||||
};
|
||||
|
||||
/**
|
||||
* Shallow-compare two objects for equality: each key and value must be
|
||||
* identical
|
||||
*/
|
||||
module.exports.shallowEqual = function(objA, objB) {
|
||||
if (objA === objB) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof objA !== 'object' || objA === null ||
|
||||
typeof objB !== 'object' || objB === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var keysA = Object.keys(objA);
|
||||
var keysB = Object.keys(objB);
|
||||
|
||||
if (keysA.length !== keysB.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < keysA.length; i++) {
|
||||
var key = keysA[i];
|
||||
if (!objB.hasOwnProperty(key) || objA[key] !== objB[key]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue