From 9b59bc32476799c5935ecbdb81e83488d22a07d9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 11 Oct 2016 23:20:22 +0300 Subject: [PATCH] closes #5103 --- public/src/client/chats/search.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/src/client/chats/search.js b/public/src/client/chats/search.js index 947959f7a4..6701563639 100644 --- a/public/src/client/chats/search.js +++ b/public/src/client/chats/search.js @@ -1,6 +1,6 @@ 'use strict'; -/* globals define, socket, app, ajaxify */ +/* globals define, socket, app */ define('forum/chats/search', ['components'], function(components) { @@ -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); }