Skip to content

Commit e24f169

Browse files
committed
again
1 parent 1f0352c commit e24f169

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/react/ImageBlurPreloader.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ const ImageBlurPreloader: FC<Props> = ({
5454
height: mainAttributes.height,
5555
};
5656

57+
const blurAlt = !isLoadingBlur ? blurAttributes.alt : '';
58+
const mainAlt = !isLoadingMain ? mainAttributes.alt : '';
59+
5760
const hasImage = Boolean(
5861
isLoadingMain
5962
? mainAttributes.src || mainAttributes.srcSet
@@ -68,7 +71,7 @@ const ImageBlurPreloader: FC<Props> = ({
6871
<img
6972
{...blurAttributes}
7073
{...commonAttributes}
71-
alt={!isLoadingBlur ? blurAttributes.alt : ''}
74+
alt={blurAlt}
7275
onLoad={() => setIsLoadingBlur(false)}
7376
className={cn('object-cover absolute top-0 left-0 size-full', className)}
7477
/>
@@ -77,7 +80,7 @@ const ImageBlurPreloader: FC<Props> = ({
7780
<img
7881
{...mainAttributes}
7982
{...commonAttributes}
80-
alt={!isLoadingMain ? mainAttributes.alt : ''}
83+
alt={mainAlt}
8184
onLoad={handleLoadMain}
8285
className={cn(
8386
'object-cover absolute top-0 left-0 size-full',

0 commit comments

Comments
 (0)