Skip to content

Commit

Permalink
feat(engine): ⚡️ Attempt to make redirections more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 19, 2022
1 parent 54a757b commit a089a45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/bot-engine/src/services/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ const executeRedirect = (
{ typebot: { variables } }: LogicContext
): EdgeId | undefined => {
if (!step.options?.url) return step.outgoingEdgeId
window.open(
sanitizeUrl(parseVariables(variables)(step.options?.url)),
step.options.isNewTab ? '_blank' : '_self'
)
const tempLink = document.createElement('a')
tempLink.href = sanitizeUrl(parseVariables(variables)(step.options?.url))
tempLink.setAttribute('target', step.options.isNewTab ? '_blank' : '_self')
tempLink.click()
return step.outgoingEdgeId
}

Expand Down

4 comments on commit a089a45

@vercel
Copy link

@vercel vercel bot commented on a089a45 Apr 19, 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 a089a45 Apr 19, 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 a089a45 Apr 19, 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

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

Please sign in to comment.