Skip to content

Fixes #405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 25, 2020
Merged

Fixes #405

Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix issue when final level complete but not continued
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Jul 25, 2020
commit bec93ec56029879faea0f9d1b28b06be30490a46
9 changes: 9 additions & 0 deletions src/services/context/state/Position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ class Position {

// get step
const currentLevel: TT.Level = levels[lastLevelIndex]
if (!currentLevel) {
// tutorial complete but not reached completed view
const finalLevel = levels[levels.length - 1]
return {
levelId: finalLevel.id,
stepId: finalLevel.steps.length ? finalLevel.steps[finalLevel.steps.length - 1].id : null,
complete: true,
}
}
let currentStepId: string | null
if (!currentLevel.steps.length) {
// no steps available for level
Expand Down