check for thumbnail cdn in config before using

This commit is contained in:
Sean Yesmunt 2020-12-08 15:11:23 -05:00
parent e81d11fd55
commit a23b3c8d26

View file

@ -41,7 +41,7 @@ function FileThumbnail(props: Props) {
let url = thumbnail || (hasResolvedClaim ? Placeholder : '');
// @if TARGET='web'
// Pass image urls through a compression proxy
if (thumbnail && !thumbnail.includes('https://spee.ch')) {
if (thumbnail && THUMBNAIL_CDN_URL && !thumbnail.includes('https://spee.ch')) {
url = `${THUMBNAIL_CDN_URL}${encodeURIComponent(thumbnail)}`;
}
// @endif