diff --git a/src/components/image/ImageWithFallback.tsx b/src/components/image/ImageWithFallback.tsx index 715b9199..9617b695 100644 --- a/src/components/image/ImageWithFallback.tsx +++ b/src/components/image/ImageWithFallback.tsx @@ -35,9 +35,11 @@ export default function ImageWithFallback({ useState(!hasLoadedWithAnimations); const srcString = typeof props.src === 'string' ? props.src : undefined; - const useDirectStorage = DIRECT_STORAGE_IMAGES && - Boolean(srcString) && - isExternalStoragePhotoUrl(srcString!); + const useDirectStorage = Boolean( + DIRECT_STORAGE_IMAGES && + srcString && + isExternalStoragePhotoUrl(srcString), + ); const displayWidth = typeof props.width === 'number' ? props.width : 640; const directSrc = useDirectStorage && srcString && !fallbackSrc ? getDirectPhotoDisplayUrl(srcString, displayWidth)