Skip to content

Commit

Permalink
return empty object instead of undefined if no game state is yet created
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Nov 26, 2024
1 parent 3296fde commit 1b59077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/app/lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ Deckdle.__getState = (mode = Deckdle.__getGameMode()) => {
const seshId = Deckdle.__getSessionIndex()
const state = rootState[seshId]

return state || undefined
return state || {}
} else {
return undefined
return {}
}
}
Deckdle.__setState = (
Expand Down

0 comments on commit 1b59077

Please sign in to comment.