mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 23:12:22 +03:00
Fix route matcher for optional route segments so it supports routing to index route.
This commit is contained in:
parent
8ad0118c4e
commit
2934da1958
@ -1149,7 +1149,7 @@ function routeRegex(name) {
|
||||
return [`(.*)`];
|
||||
}
|
||||
case "optional": {
|
||||
return [`(?:\\\\/([^/]+))?`];
|
||||
return [`\\\\/(?:([^/]+))?`];
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user