fix(engine): 🐛 Equal condition number vs string
This commit is contained in:
@@ -66,13 +66,13 @@ const executeComparison =
|
|||||||
if (isNotDefined(value)) return false
|
if (isNotDefined(value)) return false
|
||||||
switch (comparison.comparisonOperator) {
|
switch (comparison.comparisonOperator) {
|
||||||
case ComparisonOperators.CONTAINS: {
|
case ComparisonOperators.CONTAINS: {
|
||||||
return inputValue.includes(value)
|
return inputValue.toString().includes(value.toString())
|
||||||
}
|
}
|
||||||
case ComparisonOperators.EQUAL: {
|
case ComparisonOperators.EQUAL: {
|
||||||
return inputValue === value
|
return inputValue.toString() === value.toString()
|
||||||
}
|
}
|
||||||
case ComparisonOperators.NOT_EQUAL: {
|
case ComparisonOperators.NOT_EQUAL: {
|
||||||
return inputValue !== value
|
return inputValue.toString() !== value.toString()
|
||||||
}
|
}
|
||||||
case ComparisonOperators.GREATER: {
|
case ComparisonOperators.GREATER: {
|
||||||
return parseFloat(inputValue) >= parseFloat(value)
|
return parseFloat(inputValue) >= parseFloat(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user