소스 검색

fix parsing spread routes

Evan Almloff 1 년 전
부모
커밋
61a3b05616
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      packages/router-macro/src/route.rs

+ 2 - 4
packages/router-macro/src/route.rs

@@ -277,10 +277,8 @@ impl Route {
                 }
             }
             for segment in &self.segments {
-                if let RouteSegment::Dynamic(other, ..) = segment {
-                    if other == name {
-                        from_route = true
-                    }
+                if segment.name().as_ref() == Some(name) {
+                    from_route = true
                 }
             }
             if let Some(query) = &self.query {