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

Commite7c5670

Browse files
committed
fix guard on final step
1 parentab0a4bd commite7c5670

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/state/guards/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ import * as CR from 'typings'
22

33
exportdefault{
44
hasNextStep:(context:CR.MachineContext):boolean=>{
5-
const{ data, position}=context
5+
const{ data, position, progress}=context
66
conststeps=data.stages[position.stageId].stepList
7-
consthasNext=steps[steps.length-1]!==position.stepId
8-
console.log('GUARD: hasNextStep',hasNext)
9-
returnhasNext
7+
// isn't final step yet
8+
if(steps[steps.length-1]!==position.stepId){
9+
returntrue
10+
}
11+
// final step is not yet complete
12+
return!progress.steps[position.stepId]
1013
},
1114
hasNextStage:(context:CR.MachineContext):boolean=>{
1215
const{ data, position}=context

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp