...
 
Commits (2)
......@@ -88,7 +88,9 @@ export default class SIBRouter extends HTMLElement {
updateURL(route, id) {
const path = route.getPath(this.prefix, route.name, route.hasAttribute('use-id') ? id : '', route.name == this.defaultRoute);
const prefix = this.useHash ? '#' : '/';
history.pushState({}, route.name, prefix + path); // update current URL
try {
history.pushState({}, route.name, prefix + path); // update current URL
} catch (e) { console.warn('"history.pushState" is not useable in this context.') }
}
}
......