@@ -33,28 +33,28 @@ class Position {
33
33
34
34
const { levels} = tutorial . version
35
35
36
- const lastLevelIndex :number | undefined = levels . findIndex ( ( l :G . Level ) => progress . levels [ l . id ] )
36
+ const lastLevelIndex :number | undefined = levels . findIndex ( ( l :G . Level ) => ! progress . levels [ l . id ] )
37
37
// TODO: consider all levels complete as progress.complete
38
38
if ( lastLevelIndex >= levels . length ) {
39
39
throw new Error ( 'Error setting progress level' )
40
40
}
41
- const currentLevel :G . Level = levels [ lastLevelIndex + 1 ]
41
+ const currentLevel :G . Level = levels [ lastLevelIndex ]
42
42
43
43
const { stages} = currentLevel
44
44
45
- const lastStageIndex :number | undefined = stages . findIndex ( ( s :G . Stage ) => progress . stages [ s . id ] )
45
+ const lastStageIndex :number | undefined = stages . findIndex ( ( s :G . Stage ) => ! progress . stages [ s . id ] )
46
46
if ( lastStageIndex >= stages . length ) {
47
47
throw new Error ( 'Error setting progress stage' )
48
48
}
49
- const currentStage :G . Stage = stages [ lastStageIndex + 1 ]
49
+ const currentStage :G . Stage = stages [ lastStageIndex ]
50
50
51
51
const { steps} = currentStage
52
52
53
- const lastStepIndex :number | undefined = steps . findIndex ( ( s :G . Step ) => progress . steps [ s . id ] )
53
+ const lastStepIndex :number | undefined = steps . findIndex ( ( s :G . Step ) => ! progress . steps [ s . id ] )
54
54
if ( lastStepIndex >= steps . length ) {
55
55
throw new Error ( 'Error setting progress step' )
56
56
}
57
- const currentStep :G . Step = steps [ lastStepIndex + 1 ]
57
+ const currentStep :G . Step = steps [ lastStepIndex ]
58
58
59
59
this . value = {
60
60
levelId :currentLevel . id ,