@cocreate/events 1.22.0 → 1.22.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 +7 -0
- package/package.json +1 -1
- package/src/index.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.22.1](https://github.com/CoCreate-app/CoCreate-events/compare/v1.22.0...v1.22.1) (2024-08-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* parse flag ([53ce700](https://github.com/CoCreate-app/CoCreate-events/commit/53ce700cca7d90919b933d102cda5f73fe3261c5))
|
|
7
|
+
|
|
1
8
|
# [1.22.0](https://github.com/CoCreate-app/CoCreate-events/compare/v1.21.0...v1.22.0) (2024-06-19)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -578,15 +578,21 @@ function checkCondition(condition, value) {
|
|
|
578
578
|
if (operatorMatch)
|
|
579
579
|
condition = operatorMatch[2].trim()
|
|
580
580
|
|
|
581
|
+
let parse = true
|
|
581
582
|
if (condition === 'true') {
|
|
582
583
|
return !!value[0];
|
|
583
584
|
} else if (condition === 'false') {
|
|
584
585
|
return !value[0];
|
|
586
|
+
} else if (condition === '[]' && typeof value[0] === 'string') {
|
|
587
|
+
parse = false
|
|
585
588
|
}
|
|
586
589
|
|
|
590
|
+
|
|
591
|
+
|
|
587
592
|
// TODO: why parse updated conditin to boolean false
|
|
588
|
-
if (condition !== 'false')
|
|
593
|
+
if (parse && condition !== 'false')
|
|
589
594
|
condition = parseCondition(condition);
|
|
595
|
+
|
|
590
596
|
let result;
|
|
591
597
|
|
|
592
598
|
if (condition === '$template') {
|