Move db-unchanged to db dir

This commit is contained in:
Julia Friesel
2018-10-22 21:24:54 +02:00
parent ef7f645248
commit 1b20658eed
5 changed files with 4 additions and 4 deletions
+7
View File
@@ -0,0 +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) {
return Object.values(dbChanges).every(changeArray => changeArray.length === 0)
}