You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal:
match '/' for home
and default anything else to a 404Component
However, when speciying my "IComponentRoute":
{
path: '/',
component: whatever,
fuzzy: false
}
the deduced regex by util::router::matchRoute is ^[/]?(\/|$)/
which then matches the path /test
I would expect /test not to be matched.
For now, I am specifying for path '/[^\w]' which seems to be sufficient but that relies too much on implementation new RegExp(`^[\/]?${routePath}(\/|$)`);
which takes the string as is.
May better directly offer possibility to input regex in this case if we don't handle the '/' as strict match
Maybe I overlooked something though?
The text was updated successfully, but these errors were encountered:
Goal:
match
'/'
for homeand default anything else to a 404Component
However, when speciying my "IComponentRoute":
the deduced regex by
util::router::matchRoute
is^[/]?(\/|$)/
which then matches the path
/test
I would expect
/test
not to be matched.For now, I am specifying for path
'/[^\w]'
which seems to be sufficient but that relies too much on implementationnew RegExp(`^[\/]?${routePath}(\/|$)`);
which takes the string as is.
May better directly offer possibility to input regex in this case if we don't handle the '/' as strict match
Maybe I overlooked something though?
The text was updated successfully, but these errors were encountered: