Skip to content

Commit

Permalink
fix: picture fallback check (#10783)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajkapsz authored Apr 15, 2024
1 parent a4e7d66 commit 4dbd545
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/modern-mugs-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fixes Picture component specialFormatsFallback fallback check
2 changes: 1 addition & 1 deletion packages/astro/components/Picture.astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let resultFallbackFormat = fallbackFormat ?? defaultFallbackFormat;
if (
!fallbackFormat &&
isESMImportedImage(originalSrc) &&
originalSrc.format in specialFormatsFallback
(specialFormatsFallback as ReadonlyArray<string>).includes(originalSrc.format)
) {
resultFallbackFormat = originalSrc.format;
}
Expand Down

0 comments on commit 4dbd545

Please sign in to comment.