mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
fix: progress bar calculation (#5339)
This commit is contained in:
committed by
GitHub
parent
7b764c8427
commit
93d91f80f2
@@ -83,7 +83,7 @@ export const calculateElementIdx = (
|
||||
return survey.questions.findIndex((e) => e.id === lastQuestion?.id);
|
||||
};
|
||||
|
||||
let elementIdx = currentQustionIdx || 0.5;
|
||||
let elementIdx = currentQustionIdx + 1;
|
||||
const lastprevQuestionIdx = getLastQuestionIndex();
|
||||
|
||||
if (lastprevQuestionIdx > 0) elementIdx = Math.min(middleIdx, lastprevQuestionIdx - 1);
|
||||
|
||||
Reference in New Issue
Block a user