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
Currently, basepath is simply concatenated with the path regex used in a route.
This can lead to confusing results when, say, basepath is websites/ and the route is /testpage, since Aura.Router currently will concatenate this to websites//testpage.
I have implemented a fix for this on my fork as follows:
// Trim leading and following slashes from basepath
$basePart = trim($this->basepath, '/');
// Trim leading slash from route path
$routePart = ltrim($this->route->path, '/');
// Join basepath and route with forwardslash
$this->regex = '/' . implode('/', array($basePart, $routePart));
This works great, but I found out it's too lenient. When I ran phpunit I noticed it breaks 12 test cases :/
I'll try to figure out a fix that doesn't cause this issues, but in the meantime I'll post this issue in case I forget.
The text was updated successfully, but these errors were encountered:
Currently, basepath is simply concatenated with the path regex used in a route.
This can lead to confusing results when, say, basepath is
websites/
and the route is/testpage
, since Aura.Router currently will concatenate this towebsites//testpage
.I have implemented a fix for this on my fork as follows:
This works great, but I found out it's too lenient. When I ran phpunit I noticed it breaks 12 test cases :/
I'll try to figure out a fix that doesn't cause this issues, but in the meantime I'll post this issue in case I forget.
The text was updated successfully, but these errors were encountered: