Skip to content

Node.js based forum software built for the modern web

don't crash if triggerEl is null

Barış Soner Uşaklı67585f2fd679
diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js
index 0fef33f650..891ca17fe1 100644
--- a/public/src/modules/notifications.js
+++ b/public/src/modules/notifications.js
@@ -47,7 +47,9 @@ define('notifications', [
if (scrollToPostIndexIfOnPage(notifEl)) {
ev.stopPropagation();
ev.preventDefault();
- triggerEl.dropdown('toggle');
+ if (triggerEl) {
+ triggerEl.dropdown('toggle');
+ }
}
const unread = notifEl.hasClass('unread');