fix: require

This commit is contained in:
Barış Soner Uşaklı
2026-01-20 20:15:54 -05:00
parent fffe039f46
commit d3f653e648

View File

@@ -3,11 +3,10 @@
define('forum/chats/events', [ define('forum/chats/events', [
'forum/chats',
'forum/chats/messages', 'forum/chats/messages',
'chat', 'chat',
'components', 'components',
], function (Chats, messages, chatModule, components) { ], function (messages, chatModule, components) {
const Events = {}; const Events = {};
const events = { const events = {
@@ -20,7 +19,10 @@ define('forum/chats/events', [
}; };
let chatNavWrapper = null; let chatNavWrapper = null;
Events.init = function () { let Chats = null;
Events.init = async function () {
Chats = await app.require('forum/chats');
chatNavWrapper = $('[component="chat/nav-wrapper"]'); chatNavWrapper = $('[component="chat/nav-wrapper"]');
Events.removeListeners(); Events.removeListeners();
for (const [eventName, handler] of Object.entries(events)) { for (const [eventName, handler] of Object.entries(events)) {