2
0

fix(engine): 🐛 Nested typebots webhhok exec

This commit is contained in:
Baptiste Arnaud
2022-04-19 10:09:38 -07:00
parent 240cbeed62
commit 9fbe1cc34c
4 changed files with 36 additions and 15 deletions

View File

@ -24,7 +24,7 @@ export const ConversationContainer = ({
const {
typebot,
updateVariableValue,
linkedBotEdgeIdsQueue,
linkedBotQueue,
popEdgeIdFromLinkedTypebotQueue,
} = useTypebot()
const { document: frameDocument } = useFrame()
@ -42,8 +42,8 @@ export const ConversationContainer = ({
const currentTypebot = updatedTypebot ?? typebot
const nextEdge = currentTypebot.edges.find(byId(edgeId))
if (!nextEdge) {
if (linkedBotEdgeIdsQueue.length > 0) {
const nextEdgeId = linkedBotEdgeIdsQueue[0]
if (linkedBotQueue.length > 0) {
const nextEdgeId = linkedBotQueue[0].edgeId
popEdgeIdFromLinkedTypebotQueue()
displayNextBlock(nextEdgeId)
}