Skip to content

Commit

Permalink
Merge pull request #20 from baptisteArno/fix/delete-collaborator
Browse files Browse the repository at this point in the history
fix(share): 🐛 Delete collaborator
  • Loading branch information
baptisteArno authored Apr 8, 2022
2 parents 25961d3 + c5919a7 commit 6314ce2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/builder/components/share/EditableUrl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const EditableUrl = ({

<HStack>
<EditButton size="xs" />
<CopyButton size="xs" textToCopy={`${hostname}/${pathname}`} />
<CopyButton size="xs" textToCopy={`${hostname}/${pathname ?? ''}`} />
</HStack>
</Editable>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
/>
))}
Expand Down
13 changes: 8 additions & 5 deletions packages/bot-engine/src/services/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

4 comments on commit 6314ce2

@vercel
Copy link

@vercel vercel bot commented on 6314ce2 Apr 8, 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 6314ce2 Apr 8, 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 6314ce2 Apr 8, 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 6314ce2 Apr 8, 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.