Skip to content

Commit 9c4c172

Browse files
committed
fix wrong map usage
1 parent 55a85fb commit 9c4c172

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

static/js/passedState.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ class PassedState {
2828
_prepareState(rawState) {
2929
const state = new Map();
3030
for (const level in rawState) {
31-
state[level] = [];
31+
const challenges = [];
3232
for (const challengeName of rawState[level]) {
33-
state[level].push({
33+
challenges.push({
3434
name: challengeName,
3535
passed: false
3636
});
3737
}
38+
state.set(level, challenges);
3839
}
3940

4041
return state;

0 commit comments

Comments
 (0)