don't crash if triggerEl is null

This commit is contained in:
Barış Soner Uşaklı
2025-01-20 18:39:04 -05:00
parent 90e0a2d6a6
commit 67585f2fd6

View File

@@ -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');