File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -29,20 +29,14 @@ pub(super) fn extract_style_from_member_expression<'a>(
2929 let mut ret: Vec < ExtractStyleProp > = vec ! [ ] ;
3030
3131 // Unwrap type assertions and parenthesized expressions (e.g., `({...} as const)[key]`)
32- loop {
33- let inner = match & mem. object {
34- Expression :: TSAsExpression ( ts_as) => {
35- Some ( ts_as. expression . clone_in ( ast_builder. allocator ) )
36- }
37- Expression :: ParenthesizedExpression ( p) => {
38- Some ( p. expression . clone_in ( ast_builder. allocator ) )
39- }
40- _ => None ,
41- } ;
42- match inner {
43- Some ( unwrapped) => mem. object = unwrapped,
44- None => break ,
32+ while let Some ( inner) = match & mem. object {
33+ Expression :: TSAsExpression ( ts_as) => Some ( ts_as. expression . clone_in ( ast_builder. allocator ) ) ,
34+ Expression :: ParenthesizedExpression ( p) => {
35+ Some ( p. expression . clone_in ( ast_builder. allocator ) )
4536 }
37+ _ => None ,
38+ } {
39+ mem. object = inner;
4640 }
4741
4842 if let Expression :: ArrayExpression ( array) = & mut mem. object
You can’t perform that action at this time.
0 commit comments