Skip to content

Commit

Permalink
fix: if srcset is set we need to error on it
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelchris committed Nov 8, 2024
1 parent 69dee04 commit 03847d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/shared/src/components/image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
};

Expand Down

0 comments on commit 03847d1

Please sign in to comment.