From eb842fe823c705536947b5c42c29442bd148b329 Mon Sep 17 00:00:00 2001 From: Joseph Garcia Date: Mon, 19 Feb 2024 18:27:56 -0700 Subject: [PATCH] fix --- src/dashboard/HomegamesDashboard.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/dashboard/HomegamesDashboard.js b/src/dashboard/HomegamesDashboard.js index 5af730f0..0a4bfc43 100644 --- a/src/dashboard/HomegamesDashboard.js +++ b/src/dashboard/HomegamesDashboard.js @@ -660,7 +660,6 @@ class HomegamesDashboard extends ViewableGame { } handleNewPlayer({ playerId, settings: playerSettings, info: playerInfo, requestedGame }) { - const playerView = {x: 0, y: 0, w: 100, h: 100}; const playerNodeRoot = new GameNode.Shape({ @@ -682,9 +681,15 @@ class HomegamesDashboard extends ViewableGame { if (requestedGame) { - const { gameId, versionId } = requestedGame; + let { gameId, versionId } = requestedGame; networkHelper.getGameDetails(gameId).then(gameDetails => { + if (!versionId) { + if (gameDetails.versions.length > 0) { + versionId = gameDetails.versions[gameDetails.versions.length - 1].versionId; + } + } + networkHelper.getGameVersionDetails(gameId, versionId).then(version => { const ting = { [gameId]: {