wingbot 3.55.0 → 3.55.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.55.0",
3
+ "version": "3.55.1",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -110,8 +110,15 @@ const compare = (variable, operator, value = undefined) => {
110
110
  }
111
111
 
112
112
  if (variable && typeof variable === 'object' && !isArrayLengthCompare) {
113
- return Object.values(variable)
114
- .some((variableElement) => compare(variableElement, operator, value));
113
+ switch (operator) {
114
+ case ConditionOperators['is true']:
115
+ return Object.keys(variable).length !== 0;
116
+ case ConditionOperators['is false']:
117
+ return Object.keys(variable).length === 0;
118
+ default:
119
+ return Object.values(variable)
120
+ .some((variableElement) => compare(variableElement, operator, value));
121
+ }
115
122
  }
116
123
 
117
124
  switch (operator) {