0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix: picture fallback check (#10783)

This commit is contained in:
Juraj Kapsz 2024-04-15 10:52:39 +02:00 committed by GitHub
parent a4e7d6650d
commit 4dbd545304
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Fixes Picture component specialFormatsFallback fallback check

View file

@ -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;
}