Skip to content

Commit

Permalink
Add dlc capsule image fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Nov 14, 2024
1 parent 2c35a81 commit 911a72f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/community/achievements.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,18 @@ function InitAchievements( items, isPersonal )
}
else
{
summaryGameLogoImg.addEventListener( 'error', () =>
{
summaryGameLogoImg.addEventListener( 'error', () =>
{
summaryGameLogoImg.src = gameLogoElement.querySelector( 'img' ).src;
}, { once: true } );

// Fallback to the header for now because they are not hashed
summaryGameLogoImg.src = `${applicationConfig.STORE_ICON_BASE_URL}${dlcAppId}/header.jpg`;
}, { once: true } );

// TODO: Need to query the api to get correct hashed url for the capsule
summaryGameLogoImg.src = `${applicationConfig.STORE_ICON_BASE_URL}${dlcAppId}/capsule_184x69.jpg`;
}

Expand Down

0 comments on commit 911a72f

Please sign in to comment.