Commit 3f082cc5 authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: remove errors

parent 6b9040a9
Pipeline #4947 passed with stage
in 1 minute and 31 seconds
......@@ -11,7 +11,8 @@ class SIBBadge extends SIBTemplateElement {
// On read events, remove badge
window.addEventListener('read', event => {
if (event.detail &&
if (this.querySelector('.counter') &&
event.detail &&
event.detail.resource &&
event.detail.resource['@id'] &&
event.detail.resource['@id'] == this.resourceId) {
......
......@@ -54,7 +54,7 @@ class SIBNotifications extends SIBTemplateElement {
// Refresh every 30 seconds
window.setInterval(() => {
if (!this.querySelector('details').hasAttribute("open")) { // prevent menu from closing on refresh
if (this.querySelector('details') && !this.querySelector('details').hasAttribute("open")) { // prevent menu from closing on refresh
this.refresh()
}
}, 30000);
......
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