@cocreate/mongodb 1.12.2 → 1.12.3

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.12.3](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.2...v1.12.3) (2023-11-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * operator ([15a617e](https://github.com/CoCreate-app/CoCreate-mongodb/commit/15a617eec39db3d1b67c2fe0221f6340112e43ed))
7
+
1
8
  ## [1.12.2](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.12.1...v1.12.2) (2023-11-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/mongodb",
3
- "version": "1.12.2",
3
+ "version": "1.12.3",
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",
package/src/index.js CHANGED
@@ -695,6 +695,12 @@ function createQuery(queries) {
695
695
  query[key][item.operator] = item.value;
696
696
  break;
697
697
  case '$in':
698
+ if (!Array.isArray(item.value))
699
+ query[key][item.operator] = [item.value]
700
+ else
701
+ query[key] = { $in: item.value }
702
+ break;
703
+
698
704
  case '$nin':
699
705
  if (!Array.isArray(item.value))
700
706
  query[key][item.operator] = [item.value]