Commit 879254de authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: fix error when no notification menu

parent 4b55326b
Pipeline #3605 passed with stage
in 27 seconds
......@@ -22,7 +22,6 @@
<ul>
<li><a href="examples/notifications.html">notifications</a></li>
<li><a href="examples/notifications-routing.html">notifications-routing</a></li>
<li><a href="examples/badge.html">badge</a></li>
</ul>
</body>
</html>
......@@ -39,7 +39,8 @@ class SIBNotifications extends SIBTemplateElement {
// Document -> close menu
document.addEventListener("click", event => {
if (!event.target.closest('.sib-notifications')) {
this.querySelector('details').removeAttribute("open")
let notificationsMenu = this.querySelector('details');
if (notificationsMenu) notificationsMenu.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