Skip to content
Prev Previous commit
Next Next commit
fix getProgress issue
Signed-off-by: shmck <[email protected]>
  • Loading branch information
ShMcK committed Jul 31, 2020
commit 73409626790dee5567283eb5ff4a30ff3957ae31
2 changes: 1 addition & 1 deletion web-app/src/containers/Start/getProgress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getProgress = (levels: TT.Level[] = [], position: T.Position): number => {
}
// check if the level is complete
if (position.stepId && currentLevel.steps && currentLevel.steps.length) {
const lastStepInLevel: TT.Step | null = currentLevel.steps[currentLevel.steps.length]
const lastStepInLevel: TT.Step | null = currentLevel.steps[currentLevel.steps.length - 1]
isLevelComplete = position.complete && lastStepInLevel.id === position.stepId
} else {
isLevelComplete = position.complete
Expand Down