feat(engine): ⚡️ Attempt to make redirections more reliable
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user