File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ export default {
55 const { data, position, progress } = context
66 const steps = data . stages [ position . stageId ] . stepList
77 // isn't final step yet
8- const hasNext = steps [ steps . length - 1 ] !== position . stepId || ! progress . stages [ position . stageId ]
8+ const hasNext = ! ! position . stepId && ( steps [ steps . length - 1 ] !== position . stepId ) || ! progress . stages [ position . stageId ]
99 console . log ( 'GUARD: hasNextStep' , hasNext )
1010 return hasNext
1111 } ,
1212 hasNextStage : ( context : CR . MachineContext ) : boolean => {
1313 const { data, position } = context
1414 const stages = data . levels [ position . levelId ] . stageList
15- const hasNext = stages [ stages . length - 1 ] !== position . stageId
15+ const hasNext = ! ! position . stageId && stages [ stages . length - 1 ] !== position . stageId
1616 console . log ( 'GUARD: hasNextStage' , hasNext )
1717 return hasNext
1818 } ,
1919 hasNextLevel : ( context : CR . MachineContext ) : boolean => {
2020 const { data, position } = context
2121 const levels = data . summary . levelList
22- const hasNext = levels [ levels . length - 1 ] !== position . levelId
22+ const hasNext = ! ! position . levelId && levels [ levels . length - 1 ] !== position . levelId
2323 console . log ( 'GUARD: hasNextLevel' , hasNext )
2424 return hasNext
2525 } ,
You can’t perform that action at this time.
0 commit comments