Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prosif committed Feb 20, 2024
1 parent 5dc33ab commit eb842fe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/dashboard/HomegamesDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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]: {
Expand Down

0 comments on commit eb842fe

Please sign in to comment.