Node.js based forum software built for the modern web
add socket events even if there is no dropdown
Barış Soner Uşaklı975bca027fc1
diff --git a/public/src/client/header/chat.js b/public/src/client/header/chat.jsindex d52f4c6c72..d91a9a95bb 100644--- a/public/src/client/header/chat.js+++ b/public/src/client/header/chat.js@@ -7,10 +7,6 @@ define('forum/header/chat', [chat.prepareDOM = function () {const chatsToggleEl = $('[component="chat/dropdown"]');- if (!chatsToggleEl.length) {- return;- }-chatsToggleEl.on('show.bs.dropdown', (ev) => {requireAndCall('loadChatsDropdown', $(ev.target).parent().find('[component="chat/list"]'));});diff --git a/public/src/client/header/notifications.js b/public/src/client/header/notifications.jsindex 2b37b45cd0..bff84bd849 100644--- a/public/src/client/header/notifications.js+++ b/public/src/client/header/notifications.js@@ -5,9 +5,6 @@ define('forum/header/notifications', function () {notifications.prepareDOM = function () {const notifTrigger = $('[component="notifications"] [data-bs-toggle="dropdown"]');- if (!notifTrigger.length) {- return;- }notifTrigger.on('show.bs.dropdown', (ev) => {requireAndCall('loadNotifications', $(ev.target).parent().find('[component="notifications/list"]'));