diff --git a/.changeset/modern-mugs-raise.md b/.changeset/modern-mugs-raise.md new file mode 100644 index 0000000000..0796acf9f8 --- /dev/null +++ b/.changeset/modern-mugs-raise.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes Picture component specialFormatsFallback fallback check diff --git a/packages/astro/components/Picture.astro b/packages/astro/components/Picture.astro index f23ab6ccce..6dcc50c8e1 100644 --- a/packages/astro/components/Picture.astro +++ b/packages/astro/components/Picture.astro @@ -45,7 +45,7 @@ let resultFallbackFormat = fallbackFormat ?? defaultFallbackFormat; if ( !fallbackFormat && isESMImportedImage(originalSrc) && - originalSrc.format in specialFormatsFallback + (specialFormatsFallback as ReadonlyArray).includes(originalSrc.format) ) { resultFallbackFormat = originalSrc.format; }