diff --git a/static/js/directives/chat.js b/static/js/directives/chat.js index 72004311..97a81abe 100644 --- a/static/js/directives/chat.js +++ b/static/js/directives/chat.js @@ -319,7 +319,7 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], }; scope.$on("room", function(event, room) { - if (room) { + if (room !== null) { scope.showRoom(group_chat_id, {title: translation._("Group chat")}, {restore: true, minimized: true}); } else { scope.hideRoom(group_chat_id); diff --git a/static/js/directives/usability.js b/static/js/directives/usability.js index 930d5bee..5375f185 100644 --- a/static/js/directives/usability.js +++ b/static/js/directives/usability.js @@ -93,13 +93,13 @@ define(['jquery', 'underscore', 'text!partials/usability.html'], function($, _, }); $scope.$on("room", function(event, room) { - //console.log("roomStatus", status); + console.log("roomStatus", room !== null ? true : false); if (complete) { if (initializer !== null) { $timeout.cancel(initializer); initializer = null; } - ctrl.setInfo(room ? "room" : "noroom"); + ctrl.setInfo(room !== null ? "room" : "noroom"); } });