@cocreate/indexeddb 1.14.4 → 1.14.6

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,17 @@
1
+ ## [1.14.6](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.5...v1.14.6) (2023-10-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * array || [] ([f707b45](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/f707b4531551ffcbdfd3f0d96e18a9e1c8106913))
7
+
8
+ ## [1.14.5](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.4...v1.14.5) (2023-10-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * if array does not exist apply error to log ([fc1e101](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/fc1e101ab0f9b7919bb0c4cff476a03c26191952))
14
+
1
15
  ## [1.14.4](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.3...v1.14.4) (2023-10-14)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/indexeddb",
3
- "version": "1.14.4",
3
+ "version": "1.14.6",
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
@@ -86,7 +86,7 @@ async function send(data) {
86
86
  if (!Array.isArray(databases))
87
87
  databases = [databases]
88
88
 
89
- let arrays = data.array;
89
+ let arrays = data.array || [];
90
90
  if (!Array.isArray(arrays))
91
91
  arrays = [arrays]
92
92
 
@@ -437,7 +437,7 @@ async function processObject(data, newData, database, array, type) {
437
437
  db.close()
438
438
  db = await processDatabase({ method: 'get.database', database, array })
439
439
  } else {
440
- throw new Error({ error: "array does not exist", array });
440
+ return errorHandler(data, "array does not exist", database, array)
441
441
  }
442
442
  }
443
443
 
@@ -566,7 +566,6 @@ async function processObject(data, newData, database, array, type) {
566
566
 
567
567
  }
568
568
  } catch (error) {
569
- console.log(error)
570
569
  errorHandler(data, error, database, array)
571
570
  }
572
571