From 6a475b5e4149154e3fd21434334898f03500f520 Mon Sep 17 00:00:00 2001 From: JoaquinOlivero Date: Tue, 10 Sep 2024 21:48:57 +0000 Subject: [PATCH] fix: remove log and correctly set the if statement for the cached image component --- src/components/Common/CachedImage/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/Common/CachedImage/index.tsx b/src/components/Common/CachedImage/index.tsx index e5c659f8..7c0d52c2 100644 --- a/src/components/Common/CachedImage/index.tsx +++ b/src/components/Common/CachedImage/index.tsx @@ -16,14 +16,10 @@ const CachedImage = ({ src, ...props }: ImageProps) => { if (typeof imageUrl === 'string' && imageUrl.startsWith('http')) { const parsedUrl = new URL(imageUrl); - console.log(parsedUrl); - if (parsedUrl.host === 'image.tmdb.org') { if (currentSettings.cacheImages) imageUrl = imageUrl.replace('https://image.tmdb.org', '/imageproxy'); - } - - if (parsedUrl.protocol === 'http:') { + } else if (parsedUrl.host !== 'gravatar.com') { imageUrl = '/avatarproxy/' + imageUrl; } }