@cocreate/indexeddb 1.14.5 → 1.15.0
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 +15 -0
- package/package.json +1 -1
- package/src/index.js +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [1.15.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.6...v1.15.0) (2023-10-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* ObjectId() returns an object containg the parts iof the _id along with a toString() function ([5d9212b](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/5d9212ba20fb6b26159471a2c09c10ddde94b4e0))
|
|
7
|
+
* ObjectId() returns an object containg the parts iof the _id along with a toString() function ([d6b8ccd](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/d6b8ccddf073e1bd6e13d76966b1ac3bd083b14d))
|
|
8
|
+
|
|
9
|
+
## [1.14.6](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.5...v1.14.6) (2023-10-21)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* array || [] ([f707b45](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/f707b4531551ffcbdfd3f0d96e18a9e1c8106913))
|
|
15
|
+
|
|
1
16
|
## [1.14.5](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.14.4...v1.14.5) (2023-10-16)
|
|
2
17
|
|
|
3
18
|
|
package/package.json
CHANGED
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
|
|
|
@@ -480,7 +480,7 @@ async function processObject(data, newData, database, array, type) {
|
|
|
480
480
|
data[type][i]['organization_id'] = data.organization_id
|
|
481
481
|
|
|
482
482
|
if (!data[type][i]._id)
|
|
483
|
-
data[type][i]['_id'] = ObjectId()
|
|
483
|
+
data[type][i]['_id'] = ObjectId().toString()
|
|
484
484
|
data[type][i] = dotNotationToObject(data[type][i])
|
|
485
485
|
data[type][i]['created'] = { on: data.timeStamp, by: data.user_id || data.clientId }
|
|
486
486
|
|
|
@@ -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
|
|
|
@@ -596,7 +595,7 @@ function openCursor(objectStore, range, direction, data, newData, isFilter, limi
|
|
|
596
595
|
try {
|
|
597
596
|
data[type][i]._id = ObjectId(data[type][i]._id);
|
|
598
597
|
} catch (error) {
|
|
599
|
-
data[type][i]._id = ObjectId()
|
|
598
|
+
data[type][i]._id = ObjectId().toString()
|
|
600
599
|
}
|
|
601
600
|
|
|
602
601
|
let result
|