From 5ff7a876964ab76eaf07b7afc8e85ce50d9a5e03 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Sun, 23 Jul 2023 21:44:35 +0200 Subject: [PATCH] fix --- client/src/state/progress.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/state/progress.ts b/client/src/state/progress.ts index 50ab0ee..8aa65d3 100644 --- a/client/src/state/progress.ts +++ b/client/src/state/progress.ts @@ -168,7 +168,7 @@ export function selectProgress(game: string) { /** return progress for the current game if it exists */ export function selectDifficulty(game: string) { return (state) => { - return state.progress.games[game].difficulty ?? DEFAULT_DIFFICULTY + return state.progress.games[game]?.difficulty ?? DEFAULT_DIFFICULTY } }