2
0

♻️ Use at function instead of dangerous direct lookup array index

This commit is contained in:
Baptiste Arnaud
2024-03-04 14:14:06 +01:00
parent a043c3e4b9
commit 4ca613e83a
6 changed files with 37 additions and 31 deletions

View File

@ -19,5 +19,5 @@ export const getFirstEdgeId = ({
return event.outgoingEdgeId
}
if (typebot.version === '6') return typebot.events[0].outgoingEdgeId
return typebot.groups[0].blocks[0].outgoingEdgeId
return typebot.groups.at(0)?.blocks.at(0)?.outgoingEdgeId
}