cry-synced-db-client 0.1.128 → 0.1.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5137,9 +5137,13 @@ var DexieDb = class extends Dexie {
|
|
|
5137
5137
|
}
|
|
5138
5138
|
async clearDirtyChangesBatch(collection, ids) {
|
|
5139
5139
|
if (ids.length === 0) return;
|
|
5140
|
-
const
|
|
5141
|
-
for (const id of ids)
|
|
5142
|
-
|
|
5140
|
+
const promises = [];
|
|
5141
|
+
for (const id of ids) {
|
|
5142
|
+
promises.push(
|
|
5143
|
+
this.dirtyChanges.delete([collection, this.idToString(id)])
|
|
5144
|
+
);
|
|
5145
|
+
}
|
|
5146
|
+
await Promise.all(promises);
|
|
5143
5147
|
}
|
|
5144
5148
|
async clearDirtyChanges(collection) {
|
|
5145
5149
|
await this.dirtyChanges.where("[collection+id]").between([collection, Dexie.minKey], [collection, Dexie.maxKey]).delete();
|