mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-19 21:04:33 +08:00
parent
8a28c84415
commit
c26ab77786
@ -384,7 +384,12 @@ const parseTranscriptProps = async (
|
||||
const parsePreviewTranscriptProps = async (
|
||||
state: SessionState
|
||||
): Promise<ParsedTranscriptProps | undefined> => {
|
||||
if (!state.previewMetadata) return
|
||||
if (!state.previewMetadata)
|
||||
return {
|
||||
answers: [],
|
||||
setVariableHistory: [],
|
||||
visitedEdges: [],
|
||||
}
|
||||
return {
|
||||
answers: state.previewMetadata.answers ?? [],
|
||||
setVariableHistory: state.previewMetadata.setVariableHistory ?? [],
|
||||
|
||||
@ -131,7 +131,14 @@ const executeGroup = ({
|
||||
for (const block of nextGroup?.group.blocks.slice(
|
||||
nextGroup.blockIndex ?? 0
|
||||
)) {
|
||||
if (stopAtBlockId && block.id === stopAtBlockId) return currentTranscript
|
||||
if (
|
||||
stopAtBlockId &&
|
||||
block.id === stopAtBlockId &&
|
||||
answers.length === 0 &&
|
||||
setVariableHistory.length === 0 &&
|
||||
visitedEdges.length === 0
|
||||
)
|
||||
return currentTranscript
|
||||
if (setVariableHistory.at(0)?.blockId === block.id)
|
||||
typebotsQueue[0].typebot.variables = applySetVariable(
|
||||
setVariableHistory.shift(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user