浏览代码

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 {