From fdb02a3da43883dd931f4b34c29457fc10059169 Mon Sep 17 00:00:00 2001 From: Ryan Cohen Date: Fri, 30 Sep 2022 20:58:18 +0900 Subject: [PATCH] fix: only parse image urls that start with http --- src/components/Common/CachedImage/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Common/CachedImage/index.tsx b/src/components/Common/CachedImage/index.tsx index 96af5489..6dfb8ee7 100644 --- a/src/components/Common/CachedImage/index.tsx +++ b/src/components/Common/CachedImage/index.tsx @@ -13,7 +13,7 @@ const CachedImage = ({ src, ...props }: ImageProps) => { let imageUrl = src; - if (typeof imageUrl === 'string') { + if (typeof imageUrl === 'string' && imageUrl.startsWith('http')) { const parsedUrl = new URL(imageUrl); if (parsedUrl.host === 'image.tmdb.org' && currentSettings.cacheImages) {