Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ca0266 commit 299769fCopy full SHA for 299769f
src/channel/state/Position.ts
@@ -54,7 +54,9 @@ class Position {
54
if (lastStepIndex >= steps.length) {
55
throw new Error('Error setting progress step')
56
}
57
- const currentStep: G.Step = steps[lastStepIndex]
+ // handle position when last step is complete but "continue" not yet selected
58
+ const adjustedLastStepIndex = lastStepIndex === -1 ? steps.length - 1 : lastStepIndex
59
+ const currentStep: G.Step = steps[adjustedLastStepIndex]
60
61
this.value = {
62
levelId: currentLevel.id,
0 commit comments