...
 
Commits (2)
...@@ -41,12 +41,12 @@ export default class SIBRouter extends HTMLElement { ...@@ -41,12 +41,12 @@ export default class SIBRouter extends HTMLElement {
display(routeName = this.currentRouteName, resource, keepURL=false) { display(routeName = this.currentRouteName, resource, keepURL=false) {
for (let route of this.routes) { for (let route of this.routes) {
if (routeName === route.name) { if (routeName === route.name) {
route.activate(keepURL);
this.dispatchEvent( this.dispatchEvent(
new CustomEvent('navigate', { new CustomEvent('navigate', {
detail: { route: routeName, resource }, detail: { route: routeName, resource },
}), }),
); );
route.activate(keepURL);
} else { } else {
route.hide(); route.hide();
} }
......