Skip to content

Commit e076deb

Browse files
committed
fix load progress issue
Signed-off-by: shmck <[email protected]>
1 parent 1455975 commit e076deb

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Diff for: src/channel/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class Channel implements Channel {
8383

8484
// load continued tutorial position & progress
8585
const { position, progress } = await this.context.setTutorial(this.workspaceState, tutorial)
86+
logger('CONTINUE STATE', position, progress)
8687

8788
if (progress.complete) {
8889
// tutorial is already complete

Diff for: src/channel/state/Progress.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Progress {
5353
throw new Error(`setStepComplete level not found for stepId ${stepId}`)
5454
}
5555

56-
if (currentLevel.steps[currentLevel.steps.length - 1]) {
56+
if (currentLevel.steps[currentLevel.steps.length - 1].id === stepId) {
5757
// final step for level is complete
5858
next.levels[currentLevel.id] = true
5959

Diff for: src/services/logger/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { LOG } from '../../environment'
22

3-
export type Log = string | object | null | undefined
3+
export type Log = string | number | object | null | undefined
44

55
const logger = (...messages: Log[]): void => {
66
if (!LOG) {

0 commit comments

Comments
 (0)