Skip to content

Commit

Permalink
fix(engine): 🐛 Quit flow if redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed May 24, 2022
1 parent 71c9c74 commit 91ea637
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/bot-engine/src/components/ChatBlock/ChatBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ import { executeIntegration } from 'services/integration'
import { parseRetryStep, stepCanBeRetried } from 'services/inputs'
import { parseVariables } from '../../services/variable'
import { useAnswers } from 'contexts/AnswersContext'
import { BubbleStep, InputStep, PublicTypebot, Step } from 'models'
import {
BubbleStep,
InputStep,
LogicStepType,
PublicTypebot,
Step,
} from 'models'
import { HostBubble } from './ChatStep/bubbles/HostBubble'
import { InputChatStep } from './ChatStep/InputChatStep'
import { getLastChatStepType } from '../../services/chat'
Expand Down Expand Up @@ -119,6 +125,10 @@ export const ChatBlock = ({
pushEdgeIdInLinkedTypebotQueue,
currentTypebotId,
})
const isRedirecting =
currentStep.type === LogicStepType.REDIRECT &&
currentStep.options.isNewTab === false
if (isRedirecting) return
nextEdgeId ? onBlockEnd(nextEdgeId, linkedTypebot) : displayNextStep()
}
if (isIntegrationStep(currentStep)) {
Expand Down

4 comments on commit 91ea637

@vercel
Copy link

@vercel vercel bot commented on 91ea637 May 24, 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 91ea637 May 24, 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 91ea637 May 24, 2022

@vercel
Copy link

@vercel vercel bot commented on 91ea637 May 24, 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-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app

Please sign in to comment.