Commit b5a26094 authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: fix navigate to rdf_type

parent 8e7c54e4
Pipeline #3700 passed with stage
in 28 seconds
......@@ -36,9 +36,9 @@
extra-context='{"doap": "http://usefulinc.com/ns/doap#"}'
></sib-notifications>
<sib-router default-route="home">
<sib-router default-route="home" route-prefix="examples/notifications-routing.html">
<sib-route name="home"></sib-route>
<sib-route name="project" rdf-type="doap:project"></sib-route>
<sib-route name="project" rdf-type="doap:project" use-id></sib-route>
</sib-router>
<div id="home">
......
......@@ -81,8 +81,9 @@ class SIBNotifications extends SIBTemplateElement {
}
_onClickNotification(target) {
if(this.props.extraContext){
store.get(target.resource.object, JSON.parse(this.props.extraContext)).then((resource) => {
if (this.props.extraContext) {
const context = { ...target.context, ...JSON.parse(this.props.extraContext) }
store.get(target.resource.object, context).then((resource) => {
window.dispatchEvent(new CustomEvent('requestNavigation', { detail: { resource: resource } }))
this.querySelector('details').removeAttribute("open")
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment