diff --git a/apps/builder/components/share/EditableUrl.tsx b/apps/builder/components/share/EditableUrl.tsx index b72a6837e..cd69113ce 100644 --- a/apps/builder/components/share/EditableUrl.tsx +++ b/apps/builder/components/share/EditableUrl.tsx @@ -50,7 +50,7 @@ export const EditableUrl = ({ - + ) diff --git a/apps/builder/components/shared/TypebotHeader/CollaborationMenuButton/CollaborationList.tsx b/apps/builder/components/shared/TypebotHeader/CollaborationMenuButton/CollaborationList.tsx index 01cb61c95..6bd997ba4 100644 --- a/apps/builder/components/shared/TypebotHeader/CollaborationMenuButton/CollaborationList.tsx +++ b/apps/builder/components/shared/TypebotHeader/CollaborationMenuButton/CollaborationList.tsx @@ -200,7 +200,7 @@ export const CollaborationList = () => { name={user.name ?? undefined} type={type} isOwner={isOwner} - onDeleteClick={handleDeleteCollaboration(user.email ?? '')} + onDeleteClick={handleDeleteCollaboration(userId ?? '')} onChangeCollaborationType={handleChangeCollaborationType(userId)} /> ))} diff --git a/packages/bot-engine/src/services/logic.ts b/packages/bot-engine/src/services/logic.ts index e53d618c2..223376507 100644 --- a/packages/bot-engine/src/services/logic.ts +++ b/packages/bot-engine/src/services/logic.ts @@ -88,19 +88,22 @@ const executeCondition = ( const executeComparison = (variables: Variable[]) => (comparison: Comparison) => { if (!comparison?.variableId) return false - const inputValue = + const inputValue = ( variables.find((v) => v.id === comparison.variableId)?.value ?? '' - const value = parseVariables(variables)(comparison.value) + ) + .toString() + .trim() + const value = parseVariables(variables)(comparison.value).toString().trim() if (isNotDefined(value)) return false switch (comparison.comparisonOperator) { case ComparisonOperators.CONTAINS: { - return inputValue.toString().includes(value.toString()) + return inputValue.toLowerCase().includes(value.toLowerCase()) } case ComparisonOperators.EQUAL: { - return inputValue.toString() === value.toString() + return inputValue === value } case ComparisonOperators.NOT_EQUAL: { - return inputValue.toString() !== value.toString() + return inputValue !== value } case ComparisonOperators.GREATER: { return parseFloat(inputValue) >= parseFloat(value)