diff --git a/public/src/client/chats/search.js b/public/src/client/chats/search.js index 947959f7a4..e75a51864a 100644 --- a/public/src/client/chats/search.js +++ b/public/src/client/chats/search.js @@ -75,7 +75,9 @@ define('forum/chats/search', ['components'], function(components) { return app.alertError(err.message); } if (roomId) { - Chats.switchChat(roomId); + require(['forum/chats'], function(chats) { + chats.switchChat(roomId); + }); } else { app.newChat(userObj.uid); }