...
 
Commits (2)
...@@ -55,13 +55,13 @@ export default class SIBRouter extends HTMLElement { ...@@ -55,13 +55,13 @@ export default class SIBRouter extends HTMLElement {
} }
} }
} }
navigate(routeName = '', resource, keepURL=this.hasAttribute('keep-url')) { async navigate(routeName = '', resource, keepURL=this.hasAttribute('keep-url')) {
let route; let route;
if (routeName) { if (routeName) {
route = this.querySelector('sib-route[name="' + routeName + '"]'); route = this.querySelector('sib-route[name="' + routeName + '"]');
} else if (!routeName && resource && resource['@type']) { } else if (!routeName && resource && (await resource['@type'])) {
route = this.querySelector( route = this.querySelector(
'sib-route[rdf-type="' + resource['@type'] + '"]', 'sib-route[rdf-type="' + (await resource['@type']).toString() + '"]',
); );
routeName = route ? route.attributes.name.value : null; routeName = route ? route.attributes.name.value : null;
} }
......