Skip to content

Commit

Permalink
fix(engine): 🐛 Equal condition number vs string
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Feb 23, 2022
1 parent aca7d68 commit dd671a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/bot-engine/src/services/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ const executeComparison =
if (isNotDefined(value)) return false
switch (comparison.comparisonOperator) {
case ComparisonOperators.CONTAINS: {
return inputValue.includes(value)
return inputValue.toString().includes(value.toString())
}
case ComparisonOperators.EQUAL: {
return inputValue === value
return inputValue.toString() === value.toString()
}
case ComparisonOperators.NOT_EQUAL: {
return inputValue !== value
return inputValue.toString() !== value.toString()
}
case ComparisonOperators.GREATER: {
return parseFloat(inputValue) >= parseFloat(value)
Expand Down

2 comments on commit dd671a5

@vercel
Copy link

@vercel vercel bot commented on dd671a5 Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on dd671a5 Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io

Please sign in to comment.