patch rewrite
original written with optional chaining, changed to `&&` operations
This commit is contained in:
parent
a3420c1152
commit
e1a6cd9a44
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ const Game = ({ gameData = {}, gameRecord = [] } = {}) => {
|
|||
Game({ gameData }).initGame()
|
||||
);
|
||||
// ? why is this being wrapped?
|
||||
if (gameData?.gameData?.winner) {
|
||||
if (gameData && gameData.gameData && gameData.gameData.winner) {
|
||||
const { winner, score } = gameData.gameData;
|
||||
return game.manualEnd({ winner, score });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue