Skip to content

Commit

Permalink
feat: fixing practice repetitions when threshold is equal 0 M2-8103 (#…
Browse files Browse the repository at this point in the history
…903)

* fix/prevent practice repetitions when treshold is equal 0

* lint:fix

* adding space before condition

* adding space before condition

* removing condition and in case there is no  minimun accuracy it becomes zero

---------

Co-authored-by: Felipe Imperio <felipeimp@Felipes-MacBook-Pro.local>
  • Loading branch information
2 people authored and ChaconC committed Dec 6, 2024
1 parent 30dd6ff commit 8fe4a1b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/features/pass-survey/model/flankerNextStepEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ export const evaluateFlankerNextStep = (
}
}

const minimumAccuracy = itemConfiguration.minimumAccuracy;

if (!minimumAccuracy) {
return currentIndex + 1;
}
const minimumAccuracy = itemConfiguration.minimumAccuracy ?? 0;

if (correctCount * 100 >= totalCount * minimumAccuracy) {
const lastPracticeIndex = items.findIndex(
Expand Down

0 comments on commit 8fe4a1b

Please sign in to comment.