getImageProxyUrl: don't assume IMAGE_PROXY_URL is always defined
This allows us to disable it by not defining.
This commit is contained in:
parent
b40160a939
commit
0d3f6c2f9e
1 changed files with 6 additions and 1 deletions
|
@ -25,7 +25,12 @@ export function getThumbnailCdnUrl(props: Props) {
|
|||
}
|
||||
|
||||
export function getImageProxyUrl(thumbnail: ?string) {
|
||||
if (thumbnail && !thumbnail.startsWith(THUMBNAIL_CDN_URL) && !thumbnail.startsWith(IMAGE_PROXY_URL)) {
|
||||
if (
|
||||
IMAGE_PROXY_URL &&
|
||||
thumbnail &&
|
||||
!thumbnail.startsWith(THUMBNAIL_CDN_URL) &&
|
||||
!thumbnail.startsWith(IMAGE_PROXY_URL)
|
||||
) {
|
||||
return `${IMAGE_PROXY_URL}?${thumbnail}`;
|
||||
}
|
||||
return thumbnail;
|
||||
|
|
Loading…
Reference in a new issue