From 03847d12ae951f56f19859fb898e6ec2173e547c Mon Sep 17 00:00:00 2001 From: Chris Bongers Date: Fri, 8 Nov 2024 14:19:59 +0200 Subject: [PATCH] fix: if srcset is set we need to error on it --- packages/shared/src/components/image/Image.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/shared/src/components/image/Image.tsx b/packages/shared/src/components/image/Image.tsx index 200097afdd..635201ce90 100644 --- a/packages/shared/src/components/image/Image.tsx +++ b/packages/shared/src/components/image/Image.tsx @@ -47,6 +47,10 @@ const ImageComponent = ( if (finalFallbackSrc && finalFallbackSrc !== event.currentTarget.src) { // eslint-disable-next-line no-param-reassign event.currentTarget.src = finalFallbackSrc; + if (event.currentTarget.srcset) { + // eslint-disable-next-line no-param-reassign + event.currentTarget.srcset = finalFallbackSrc; + } } };