mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-04-09 14:09:32 +02:00
check triggerEl in callbacks
This commit is contained in:
@@ -48,9 +48,8 @@ define('notifications', [
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
}
|
||||
if (triggerEl) {
|
||||
triggerEl.dropdown('toggle');
|
||||
}
|
||||
|
||||
triggerEl?.dropdown('toggle');
|
||||
|
||||
const unread = notifEl.hasClass('unread');
|
||||
if (!unread) {
|
||||
@@ -61,10 +60,10 @@ define('notifications', [
|
||||
});
|
||||
components.get('notifications').on('click', '.mark-all-read', () => {
|
||||
Notifications.markAllRead();
|
||||
triggerEl.dropdown('toggle');
|
||||
triggerEl?.dropdown('toggle');
|
||||
});
|
||||
components.get('notifications').on('click', `[href="${config.relative_path}/notifications"]`, () => {
|
||||
triggerEl.dropdown('toggle');
|
||||
triggerEl?.dropdown('toggle');
|
||||
});
|
||||
|
||||
Notifications.handleUnreadButton(notifList);
|
||||
|
||||
Reference in New Issue
Block a user