@cocreate/mongodb 1.12.3 → 1.13.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.13.1](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.13.0...v1.13.1) (2023-11-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * handle object value string ([a97f529](https://github.com/CoCreate-app/CoCreate-mongodb/commit/a97f529b6991d6e7bf9967b7cd4bb6e7a0d6178d))
7
+
8
+ # [1.13.0](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.3...v1.13.0) (2023-11-19)
9
+
10
+
11
+ ### Features
12
+
13
+ * update dependecies for th latest features and bug fixes ([26967d0](https://github.com/CoCreate-app/CoCreate-mongodb/commit/26967d055fa90ea291d799b27dfa998dee8a3ccd))
14
+
1
15
  ## [1.12.3](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.2...v1.12.3) (2023-11-18)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/mongodb",
3
- "version": "1.12.3",
3
+ "version": "1.13.1",
4
4
  "description": "A simple mongodb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "mongodb",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "dependencies": {
48
- "@cocreate/utils": "^1.27.1",
48
+ "@cocreate/utils": "^1.27.4",
49
49
  "mongodb": "^4.12.1"
50
50
  }
51
51
  }
package/src/index.js CHANGED
@@ -272,7 +272,9 @@ function object(method, data) {
272
272
 
273
273
  if (!data[type])
274
274
  data[type] = []
275
- if (data[type] && !Array.isArray(data[type]))
275
+ else if (typeof data[type] === 'string')
276
+ data[type] = [{ _id: data[type] }]
277
+ else if (!Array.isArray(data[type]))
276
278
  data[type] = [data[type]]
277
279
 
278
280
  let isFilter