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

Commit367c98c

Browse files
committed
step progress
1 parent76420e5 commit367c98c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

‎web-app/src/services/selectors/position.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const initialPosition = createSelector(tutorial.currentVersion, (version:
1212
constlevel=version.data.levels[0]
1313
constposition:CR.Position={
1414
levelId:level.id,
15-
stepId:level.steps[0].id,
15+
stepId:level.steps.length ?level.steps[0].id :'',
1616
}
1717
returnposition
1818
})

‎web-app/src/services/selectors/tutorial.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ export const currentStep = (context: MachineContext): G.Step =>
4646
currentLevel,
4747
(level:G.Level):G.Step=>{
4848
conststeps:G.Step[]=level.steps
49-
conststep:G.Step|undefined=steps.find((s:G.Step)=>s.id===context.position.stepId)
49+
letstep:G.Step|undefined=steps.find((s:G.Step)=>s.id===context.position.stepId)
5050
if(!step){
51-
consterror=newError(`No Step found for Level${level.id}. Expected step${context.position.stepId}`)
52-
onError(error)
53-
throwerror
51+
step={id:'',content:'no steps for level'}
5452
}
5553
returnstep
5654
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp