[FIX] store: change default hash function to better see changes

This commit is contained in:
Géry Debongnie
2019-04-15 16:17:39 +02:00
parent 9f77344c3a
commit 559c51a717
4 changed files with 91 additions and 84 deletions
-13
View File
@@ -113,19 +113,6 @@ export function findInTree<T extends Tree<T>>(
return null;
}
export function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
const keysA = Object.keys(objA);
for (let key of keysA) {
if (!(key in objB) || objA[key] !== objB[key]) {
return false;
}
}
return true;
}
export function patch(C: any, patchName: string, patch: any) {
const proto = C.prototype;
if (!proto.__patches) {