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:
parent
a4e7d6650d
commit
4dbd545304
2 changed files with 6 additions and 1 deletions
5
.changeset/modern-mugs-raise.md
Normal file
5
.changeset/modern-mugs-raise.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Fixes Picture component specialFormatsFallback fallback check
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue