Skip to content

Commit

Permalink
Check that exists icon_gray
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Oct 24, 2024
1 parent 0b02c5e commit a5c92c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/community/achievements.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ function InitAchievements( items, isPersonal )
}

const image = document.createElement( 'img' );
image.src = `${applicationConfig.MEDIA_CDN_COMMUNITY_URL}images/apps/${appid}/${!isPersonal || player.unlock ? achievement.icon : achievement.icon_gray}`;
image.src = `${applicationConfig.MEDIA_CDN_COMMUNITY_URL}images/apps/${appid}/${!isPersonal || player.unlock || !achievement.icon_gray ? achievement.icon : achievement.icon_gray}`;
image.className = 'steamdb_achievement_image';
element.append( image );

Expand Down Expand Up @@ -759,7 +759,7 @@ function InitAchievements( items, isPersonal )
if( isCompareView )
{
const image = document.createElement( 'img' );
image.src = `${applicationConfig.MEDIA_CDN_COMMUNITY_URL}images/apps/${appid}/${player.unlockCompare ? achievement.icon : achievement.icon_gray}`;
image.src = `${applicationConfig.MEDIA_CDN_COMMUNITY_URL}images/apps/${appid}/${player.unlockCompare && achievement.icon_gray ? achievement.icon : achievement.icon_gray}`;
image.className = 'steamdb_achievement_image steamdb_achievement_image_compare';
element.append( image );
}
Expand Down

0 comments on commit a5c92c2

Please sign in to comment.