mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-21 23:12:58 +01:00
fix: require
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user