Fix route matcher for optional route segments so it supports routing to index route.

This commit is contained in:
Dillon Kearns 2022-04-10 16:31:20 -07:00
parent 8ad0118c4e
commit 2934da1958

View File

@ -1149,7 +1149,7 @@ function routeRegex(name) {
return [`(.*)`];
}
case "optional": {
return [`(?:\\\\/([^/]+))?`];
return [`\\\\/(?:([^/]+))?`];
}
}
})