aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/notifications_widget.tpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 3347378b5..f884ff1f6 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -7,9 +7,9 @@
var sse_fallback_interval;
var sse_sys_only = {{$sys_only}};
- $(document).ready(function() {
+ document.addEventListener("DOMContentLoaded", function() {
let notificationsWrapper = document.getElementById('notifications_wrapper');
- let notificationsParent = notificationsWrapper.parentElement.id;
+ let notificationsParent = notificationsWrapper ? notificationsWrapper.parentElement.id : null;
let notificationsBtn = document.querySelector('.notifications-btn');
// Event listener for notifications button