@cocreate/utils 1.33.3 → 1.33.5
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 +14 -0
- package/package.json +1 -1
- package/src/index.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.33.5](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.33.4...v1.33.5) (2024-02-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* continue if specialSelector is empty ([af9a36e](https://github.com/CoCreate-app/CoCreate-utils/commit/af9a36e2d2ae0dcc62195bd8a049a7c0f0cd2901))
|
|
7
|
+
|
|
8
|
+
## [1.33.4](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.33.3...v1.33.4) (2024-02-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* $addToSet creates array if undefined ([64d02f9](https://github.com/CoCreate-app/CoCreate-utils/commit/64d02f9d3ee01011ee3701e781850b5e21a16ba6))
|
|
14
|
+
|
|
1
15
|
## [1.33.3](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.33.2...v1.33.3) (2024-02-14)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -244,6 +244,8 @@
|
|
|
244
244
|
} else if (operator === '$pop') {
|
|
245
245
|
newObject[keys[i]].pop();
|
|
246
246
|
} else if (operator === '$addToSet') {
|
|
247
|
+
if (!newObject[keys[i]])
|
|
248
|
+
newObject[keys[i]] = []
|
|
247
249
|
let exists
|
|
248
250
|
if (Array.isArray(value)) {
|
|
249
251
|
exists = newObject[keys[i]].some(item => Array.isArray(item) && isEqualArray(item, value));
|
|
@@ -447,6 +449,8 @@
|
|
|
447
449
|
// if (!Array.isArray(queriedElement)) {
|
|
448
450
|
// queriedElement = [queriedElement]
|
|
449
451
|
// }
|
|
452
|
+
if (!specialSelectors[k])
|
|
453
|
+
continue
|
|
450
454
|
if (k === 0) {
|
|
451
455
|
if (type[i] === 'parent')
|
|
452
456
|
queriedElement = queriedElement.parentElement
|