Add explainer for db-unchanged
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
// when data changes, realm gives us an object with updates
|
||||||
|
// https://realm.io/docs/javascript/latest/#collection-notifications
|
||||||
|
// but it sometimes gets fired even though there are no changes
|
||||||
|
// - we want to check for that and see if all arrays are empty
|
||||||
export default function (dbChanges) {
|
export default function (dbChanges) {
|
||||||
return Object.values(dbChanges).every(changeArray => changeArray.length === 0)
|
return Object.values(dbChanges).every(changeArray => changeArray.length === 0)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user