wingbot 3.38.0-alpha.4 → 3.38.0-alpha.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/package.json
CHANGED
|
@@ -88,11 +88,13 @@ const ARRAY_LENGTH_OPERATORS = [
|
|
|
88
88
|
const compare = (variable, operator, value = undefined) => {
|
|
89
89
|
const isArrayLengthCompare = ARRAY_LENGTH_OPERATORS.includes(operator);
|
|
90
90
|
if (Array.isArray(variable) && !isArrayLengthCompare) {
|
|
91
|
-
if (operator === ConditionOperators['==']
|
|
91
|
+
if ((operator === ConditionOperators['=='] || operator === ConditionOperators['!='])
|
|
92
92
|
&& (typeof value === 'number' || isStringNumber(value))) {
|
|
93
93
|
|
|
94
94
|
const numeric = toNumber(value);
|
|
95
|
-
return
|
|
95
|
+
return operator === ConditionOperators['==']
|
|
96
|
+
? numeric === variable.length
|
|
97
|
+
: numeric !== variable.length;
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
if (operator === ConditionOperators['not contains']) {
|
package/src/utils/getUpdate.js
CHANGED
|
@@ -175,9 +175,9 @@ function getSetState (setState, req, res = null, useState = null, configuration
|
|
|
175
175
|
values = [];
|
|
176
176
|
} else {
|
|
177
177
|
const useValue = typeof value === 'string'
|
|
178
|
-
? handlebars.compile(value)(state)
|
|
179
|
-
.split(
|
|
180
|
-
.map((v) => v.
|
|
178
|
+
? handlebars.compile(value.replace(/(?<!\\),/g, '#-S-2-@#').replace(/\\,/g, ','))(state)
|
|
179
|
+
.split(/#-S-2-@#/g)
|
|
180
|
+
.map((v) => v.trim())
|
|
181
181
|
: value;
|
|
182
182
|
values = toArray(useValue);
|
|
183
183
|
}
|