8000 fix getProgress issue · yunyan523/coderoad-vscode@7340962 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7340962

Browse files
committed
fix getProgress issue
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent 79f0fba commit 7340962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web-app/src/containers/Start/getProgress.ts

Lines changed: 1 addition & 1 deletion
< 46DE td data-grid-cell-id="diff-1f9f32dcd76452d402c01d7f8429bcc43e0f8f61ca33347ec816d66dc14e6b9c-18-18-1" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative diff-line-number-neutral left-side">18
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const getProgress = (levels: TT.Level[] = [], position: T.Position): number => {
1414
}
1515
// check if the level is complete
1616
if (position.stepId && currentLevel.steps && currentLevel.steps.length) {
17-
const lastStepInLevel: TT.Step | null = currentLevel.steps[currentLevel.steps.length]
17+
const lastStepInLevel: TT.Step | null = currentLevel.steps[currentLevel.steps.length - 1]
18
isLevelComplete = position.complete && lastStepInLevel.id === position.stepId
1919
} else {
2020
isLevelComplete = position.complete

0 commit comments

Comments
 (0)
0