Skip to content

Commit

Permalink
fix: picture fallback check (withastro#10783)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajkapsz authored and PeterDraex committed Apr 23, 2024
1 parent 983abc8 commit 43d693c
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 43d693c

Please sign in to comment.