@@ -5008,27 +5008,27 @@ impl<'a, 'graph> Builder<'a, 'graph> {
50085008 let maybe_range = options. maybe_range ;
50095009 let original_specifier = specifier;
50105010 let specifier = self . graph . redirects . get ( specifier) . unwrap_or ( specifier) ;
5011- if options. is_asset {
5012- if let Some ( attribute) = & options. maybe_attribute_type {
5013- let is_allowed = match attribute . kind . as_str ( ) {
5014- "bytes" => self . unstable_bytes_imports ,
5015- "text " => self . unstable_text_imports ,
5016- _ => false ,
5017- } ;
5018- if !is_allowed {
5019- self . graph . module_slots . insert (
5020- specifier . clone ( ) ,
5021- ModuleSlot :: Err (
5022- ModuleErrorKind :: UnsupportedImportAttributeType {
5023- specifier : specifier . clone ( ) ,
5024- referrer : attribute . range . clone ( ) ,
5025- kind : attribute. kind . clone ( ) ,
5026- }
5027- . into_box ( ) ,
5028- ) ,
5029- ) ;
5030- return ;
5031- }
5011+ if options. is_asset
5012+ && let Some ( attribute) = & options. maybe_attribute_type
5013+ {
5014+ let is_allowed = match attribute . kind . as_str ( ) {
5015+ "bytes " => self . unstable_bytes_imports ,
5016+ "text" => self . unstable_text_imports ,
5017+ _ => false ,
5018+ } ;
5019+ if !is_allowed {
5020+ self . graph . module_slots . insert (
5021+ specifier . clone ( ) ,
5022+ ModuleSlot :: Err (
5023+ ModuleErrorKind :: UnsupportedImportAttributeType {
5024+ specifier : specifier . clone ( ) ,
5025+ referrer : attribute. range . clone ( ) ,
5026+ kind : attribute . kind . clone ( ) ,
5027+ }
5028+ . into_box ( ) ,
5029+ ) ,
5030+ ) ;
5031+ return ;
50325032 }
50335033 }
50345034 if let Some ( module_slot) = self . graph . module_slots . get ( specifier) {
0 commit comments