From fd8f12a7bc780686ee75756c7c58283e531c2a34 Mon Sep 17 00:00:00 2001 From: Strtus Date: Wed, 20 May 2026 20:05:50 +0800 Subject: [PATCH] Fix TypeScript type for direct storage image flag. Co-authored-by: Cursor --- src/components/image/ImageWithFallback.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)