File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,22 @@ pub fn extract_global_style_from_expression<'a>(
3131
3232 if let Expression :: ObjectExpression ( obj) = expression {
3333 for p in obj. properties . iter_mut ( ) {
34- if let ObjectPropertyKind :: ObjectProperty ( o) = p {
35- let name = if let PropertyKey :: StaticIdentifier ( ident) = & o. key {
36- ident. name . to_string ( )
34+ if let ObjectPropertyKind :: ObjectProperty ( o) = p
35+ && let Some ( name) = if let PropertyKey :: StaticIdentifier ( ident) = & o. key {
36+ Some ( ident. name . to_string ( ) )
3737 } else if let PropertyKey :: StringLiteral ( s) = & o. key {
38- s. value . to_string ( )
38+ Some ( s. value . to_string ( ) )
3939 } else if let PropertyKey :: TemplateLiteral ( t) = & o. key {
40- t. quasis
41- . iter ( )
42- . map ( |q| q. value . raw . as_str ( ) )
43- . collect :: < String > ( )
40+ Some (
41+ t. quasis
42+ . iter ( )
43+ . map ( |q| q. value . raw . as_str ( ) )
44+ . collect :: < String > ( ) ,
45+ )
4446 } else {
45- continue ;
46- } ;
47-
47+ None
48+ }
49+ {
4850 if name == "imports" {
4951 if let Expression :: ArrayExpression ( arr) = & o. value {
5052 for p in arr. elements . iter ( ) {
You can’t perform that action at this time.
0 commit comments