Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3ca0266

Browse files
committed
FIX bug for active when on last step
1 parentd76dcdb commit3ca0266

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/channel/state/Position.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,28 @@ class Position {
3333

3434
const{levels}=tutorial.version
3535

36-
constlastLevelIndex:number|undefined=levels.findIndex((l:G.Level)=>progress.levels[l.id])
36+
constlastLevelIndex:number|undefined=levels.findIndex((l:G.Level)=>!progress.levels[l.id])
3737
// TODO: consider all levels complete as progress.complete
3838
if(lastLevelIndex>=levels.length){
3939
thrownewError('Error setting progress level')
4040
}
41-
constcurrentLevel:G.Level=levels[lastLevelIndex+1]
41+
constcurrentLevel:G.Level=levels[lastLevelIndex]
4242

4343
const{stages}=currentLevel
4444

45-
constlastStageIndex:number|undefined=stages.findIndex((s:G.Stage)=>progress.stages[s.id])
45+
constlastStageIndex:number|undefined=stages.findIndex((s:G.Stage)=>!progress.stages[s.id])
4646
if(lastStageIndex>=stages.length){
4747
thrownewError('Error setting progress stage')
4848
}
49-
constcurrentStage:G.Stage=stages[lastStageIndex+1]
49+
constcurrentStage:G.Stage=stages[lastStageIndex]
5050

5151
const{steps}=currentStage
5252

53-
constlastStepIndex:number|undefined=steps.findIndex((s:G.Step)=>progress.steps[s.id])
53+
constlastStepIndex:number|undefined=steps.findIndex((s:G.Step)=>!progress.steps[s.id])
5454
if(lastStepIndex>=steps.length){
5555
thrownewError('Error setting progress step')
5656
}
57-
constcurrentStep:G.Step=steps[lastStepIndex+1]
57+
constcurrentStep:G.Step=steps[lastStepIndex]
5858

5959
this.value={
6060
levelId:currentLevel.id,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp