cleanup: popups

This commit is contained in:
Jon Eugster
2024-05-16 17:27:16 +02:00
parent d82ef8af8f
commit c1642cf09b
13 changed files with 153 additions and 94 deletions
+2 -2
View File
@@ -184,7 +184,7 @@ export function selectCompleted(game: string, world: string, level: number) {
/** return progress for the current game if it exists */
export function selectProgress(game: string) {
return (state) => {
return state.progress.games[game.toLowerCase()] ?? null
return state.progress.games[game?.toLowerCase()] ?? null
}
}
@@ -198,7 +198,7 @@ export function selectDifficulty(game: string) {
/** return whether the intro has been read */
export function selectOpenedIntro(game: string) {
return (state) => {
return state.progress.games[game.toLowerCase()]?.openedIntro
return state.progress.games[game?.toLowerCase()]?.openedIntro
}
}