From b64f787cf5d39bd475a7b7b62dcaff5e3405326c Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Sat, 10 Sep 2022 14:21:21 +0200 Subject: [PATCH] :bug: (viewer) load a bot without a start edge --- .../bot-engine/src/components/ConversationContainer.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bot-engine/src/components/ConversationContainer.tsx b/packages/bot-engine/src/components/ConversationContainer.tsx index e37f43149..f336c31e8 100644 --- a/packages/bot-engine/src/components/ConversationContainer.tsx +++ b/packages/bot-engine/src/components/ConversationContainer.tsx @@ -100,10 +100,10 @@ export const ConversationContainer = ({ updateVariables(prefilledVariables) } setHasStarted(true) + const startEdge = typebot.groups[0].blocks[0].outgoingEdgeId + if (!startEdge && !startGroupId) return displayNextGroup({ - edgeId: startGroupId - ? undefined - : typebot.groups[0].blocks[0].outgoingEdgeId, + edgeId: startGroupId ? undefined : startEdge, groupId: startGroupId, }) // eslint-disable-next-line react-hooks/exhaustive-deps