Skip to content

Node.js based forum software built for the modern web

fix: require

Barış Soner Uşaklıd3f653e6489c
diff --git a/public/src/client/chats/events.js b/public/src/client/chats/events.js
index 3a7cd3b528..4e14f941e1 100644
--- a/public/src/client/chats/events.js
+++ b/public/src/client/chats/events.js
@@ -3,11 +3,10 @@
define('forum/chats/events', [
- 'forum/chats',
'forum/chats/messages',
'chat',
'components',
-], function (Chats, messages, chatModule, components) {
+], function (messages, chatModule, components) {
const Events = {};
const events = {
@@ -20,7 +19,10 @@ define('forum/chats/events', [
};
let chatNavWrapper = null;
- Events.init = function () {
+ let Chats = null;
+
+ Events.init = async function () {
+ Chats = await app.require('forum/chats');
chatNavWrapper = $('[component="chat/nav-wrapper"]');
Events.removeListeners();
for (const [eventName, handler] of Object.entries(events)) {