2
0

🐛 (transcript) Fix typebot link incorrect next group

This commit is contained in:
Baptiste Arnaud
2024-05-16 17:14:58 +02:00
parent 3662c0d631
commit fa45564504

View File

@ -217,7 +217,11 @@ const executeGroup = ({
block.options && block.options &&
(block.options.typebotId === 'current' || (block.options.typebotId === 'current' ||
block.options.typebotId === typebotsQueue[0].typebot.id) block.options.typebotId === typebotsQueue[0].typebot.id)
if (!isLinkingSameTypebot) continue
const linkedGroup = typebotsQueue[0].typebot.groups.find(
(g) => g.id === block.options?.groupId
)
if (!isLinkingSameTypebot || !linkedGroup) continue
let resumeEdge: Edge | undefined let resumeEdge: Edge | undefined
if (!block.outgoingEdgeId) { if (!block.outgoingEdgeId) {
const currentBlockIndex = nextGroup.group.blocks.findIndex( const currentBlockIndex = nextGroup.group.blocks.findIndex(
@ -257,7 +261,9 @@ const executeGroup = ({
answers, answers,
setVariableHistory, setVariableHistory,
currentTranscript, currentTranscript,
nextGroup, nextGroup: {
group: linkedGroup,
},
visitedEdges, visitedEdges,
stopAtBlockId, stopAtBlockId,
}) })