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
When using a <base href> element, router.baseURL correctly retrieves the right value.
However, when trying to call Router.go(relativePath), no route is found.
Calling Router.go(document.querySelector('base')?.href + relativePath) does work as a workaround.
Description of the bug
When using a
<base href>
element,router.baseURL
correctly retrieves the right value.However, when trying to call
Router.go(relativePath)
, no route is found.Calling
Router.go(document.querySelector('base')?.href + relativePath)
does work as a workaround.Minimal reproducible example
See blindnet-io/privacy-components-web#84
Router.go
with the workaround: https://github.com/blindnet-io/privacy-components-web/blob/ad9649ab9f5c254a35a38375dbe1194be39a7ba0/demos/devkit-simple-tutorial/src/views/BackOffice.js#L10-L18Expected behaviour
When defining the following route:
And a base href:
Calling
Router.go('/myroute')
should find and load the associated route.Actual behavior
Only
Router.go('/my/subdir/myroute')
works (adding the base href manually).Versions:
The text was updated successfully, but these errors were encountered: