mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-28 21:01:28 +08:00
feat(engine): ⚡️ Attempt to make redirections more reliable
This commit is contained in:
parent
54a757b21b
commit
a089a451b6
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user