From a5c92c2efebd6f9a5d4f33fd6a2dad91ec8a048a Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 24 Oct 2024 15:34:08 +0300 Subject: [PATCH] Check that exists icon_gray --- scripts/community/achievements.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/community/achievements.js b/scripts/community/achievements.js index 45b568fb..61a83efb 100644 --- a/scripts/community/achievements.js +++ b/scripts/community/achievements.js @@ -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 ); @@ -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 ); }