We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 683c869 commit bec93ecCopy full SHA for bec93ec
src/services/context/state/Position.ts
@@ -42,6 +42,15 @@ class Position {
42
43
// get step
44
const currentLevel: TT.Level = levels[lastLevelIndex]
45
+ if (!currentLevel) {
46
+ // tutorial complete but not reached completed view
47
+ const finalLevel = levels[levels.length - 1]
48
+ return {
49
+ levelId: finalLevel.id,
50
+ stepId: finalLevel.steps.length ? finalLevel.steps[finalLevel.steps.length - 1].id : null,
51
+ complete: true,
52
+ }
53
54
let currentStepId: string | null
55
if (!currentLevel.steps.length) {
56
// no steps available for level
0 commit comments