@cocreate/indexeddb 1.19.0 → 1.19.1
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 +8 -0
- package/package.json +1 -1
- package/src/index.js +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.19.1](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.19.0...v1.19.1) (2023-11-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handle object value string ([bf09800](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/bf098005b0d9e494a6a5bb8941774516c3163c0b))
|
|
7
|
+
* let operator ([9e577f7](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/9e577f73bc57f283eb813a4b936d0c1d795fec44))
|
|
8
|
+
|
|
1
9
|
# [1.19.0](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.18.0...v1.19.0) (2023-11-19)
|
|
2
10
|
|
|
3
11
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -414,7 +414,9 @@ async function processObject(data, newData, database, array, type) {
|
|
|
414
414
|
try {
|
|
415
415
|
if (!data[type])
|
|
416
416
|
data[type] = []
|
|
417
|
-
if (data[type]
|
|
417
|
+
else if (typeof data[type] === 'string')
|
|
418
|
+
data[type] = [{ _id: data[type] }]
|
|
419
|
+
else if (!Array.isArray(data[type]))
|
|
418
420
|
data[type] = [data[type]]
|
|
419
421
|
|
|
420
422
|
let isFilter
|
|
@@ -788,8 +790,9 @@ function dotNotationToObjectUpdate(data, object = {}) {
|
|
|
788
790
|
let oldObject = new Object(newObject)
|
|
789
791
|
let keys = key.replace(/\[(\d+)\]/g, '.$1').split('.');
|
|
790
792
|
let value = data[key]
|
|
793
|
+
let operator
|
|
791
794
|
if (keys[0].startsWith('$'))
|
|
792
|
-
|
|
795
|
+
operator = keys.shift()
|
|
793
796
|
|
|
794
797
|
let length = keys.length - 1
|
|
795
798
|
for (let i = 0; i < keys.length; i++) {
|