@cocreate/indexeddb 1.7.9 → 1.7.10
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.7.10](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.7.9...v1.7.10) (2023-04-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* readDocumenterror handeling ([5e12fc2](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/5e12fc22097b083128bd87f3f7a0e4e0f5a486af))
|
|
7
|
+
|
|
1
8
|
## [1.7.9](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.7.8...v1.7.9) (2023-04-11)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -759,13 +759,15 @@ function runDocs({action, data, objectStore, documents, filterDocs, database, co
|
|
|
759
759
|
request = objectStore.add(doc);
|
|
760
760
|
}
|
|
761
761
|
|
|
762
|
-
if (action == 'readDocument'
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
762
|
+
if (action == 'readDocument') {
|
|
763
|
+
if (action == 'readDocument' && doc._id)
|
|
764
|
+
request = objectStore.get(doc._id);
|
|
765
|
+
else {
|
|
766
|
+
docsLength -= 1
|
|
767
|
+
errorHandler(data, {message: 'requires _id', document: doc}, database, objectStore.name)
|
|
768
|
+
if (!docsLength) {
|
|
769
|
+
resolve()
|
|
770
|
+
}
|
|
769
771
|
}
|
|
770
772
|
}
|
|
771
773
|
|