fix: only parse image urls that start with http

This commit is contained in:
Ryan Cohen
2022-09-30 20:58:18 +09:00
committed by sct
parent ad88048a94
commit fdb02a3da4

View File

@@ -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) {