@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/indexeddb",
3
- "version": "1.7.9",
3
+ "version": "1.7.10",
4
4
  "description": "A simple indexeddb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "indexeddb",
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' && doc._id) {
763
- request = objectStore.get(doc._id);
764
- } else {
765
- docsLength -= 1
766
- errorHandler(data, {message: 'requires _id', document: doc}, database, objectStore.name)
767
- if (!docsLength) {
768
- resolve()
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