🐛 (transcript) Fix typebot link incorrect next group
This commit is contained in:
@ -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,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user