From 5c232c77a7ffdb49993f7dca514684cf0cbcc68d Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Fri, 18 Apr 2025 21:44:23 +0200 Subject: [PATCH] Do not pass empty string as img src Raises the following error: "An empty string ("") was passed to the src attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to src instead of an empty string" --- src/modules/core/components/SpinnerImage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/core/components/SpinnerImage.tsx b/src/modules/core/components/SpinnerImage.tsx index 3d136219..5cb296e1 100644 --- a/src/modules/core/components/SpinnerImage.tsx +++ b/src/modules/core/components/SpinnerImage.tsx @@ -67,9 +67,9 @@ export const SpinnerImage = forwardRef( const showMissingImageIcon = !src.length; - const [imageSourceUrl, setImageSourceUrl] = useState(''); + const [imageSourceUrl, setImageSourceUrl] = useState(); const [imgLoadRetryKey, setImgLoadRetryKey] = useState(0); - const [isLoading, setIsLoading] = useState(undefined); + const [isLoading, setIsLoading] = useState(); const [hasError, setHasError] = useState(false); const [isVisible, setIsVisible] = useState(false);