diff --git a/lib/src/tree.dart b/lib/src/tree.dart index 9f21567..8055510 100644 --- a/lib/src/tree.dart +++ b/lib/src/tree.dart @@ -121,8 +121,8 @@ class RouteTree { var components = usePath.split("/"); - if (path == Navigator.defaultRouteName) { - components = ["/"]; + if (RegExp(r"(\/$|\/\?.*)").hasMatch(path)) { + components = [path]; } var nodeMatches = {};