2
0

🐛 (analytics) Fix analytics drop-off rate not computing correctly

This commit is contained in:
Baptiste Arnaud
2023-07-31 07:24:28 +02:00
parent c99298e49b
commit 3df81a3cb9

View File

@ -18,7 +18,10 @@ export const computePreviousTotalAnswers = (
)
const previousBlocks = currentGroup.blocks.slice(0, currentBlockIndex + 1)
for (const block of previousBlocks.reverse()) {
if (isInputBlock(block) || block.type === 'start')
if (
currentBlockId !== block.id &&
(isInputBlock(block) || block.type === 'start')
)
return (
totalAnswersInBlocks.find(
(totalAnswersInBlock) =>