From 07ea421bf45a9416625fce77b4aa679e1b6eb1b3 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Fri, 14 Jul 2023 11:53:44 -0700 Subject: [PATCH] ignore hash in routes for now --- packages/router-macro/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/router-macro/src/lib.rs b/packages/router-macro/src/lib.rs index 2257571a2..abbbf4355 100644 --- a/packages/router-macro/src/lib.rs +++ b/packages/router-macro/src/lib.rs @@ -515,6 +515,7 @@ impl RouteEnum { fn from_str(s: &str) -> Result { let route = s; + let (route, _hash) = route.split_once('#').unwrap_or((route, "")); let (route, query) = route.split_once('?').unwrap_or((route, "")); let mut segments = route.split('/'); // skip the first empty segment