Merge pull request #7736 from crookedneighbor/fix_post_chat

fix(client): Prevent group from freezing up when sending a chat message
This commit is contained in:
Blade Barringer
2016-06-28 08:59:41 -05:00
committed by GitHub

View File

@@ -34,7 +34,11 @@ habitrpg.controller('ChatCtrl', ['$scope', 'Groups', 'Chat', 'User', '$http', 'A
.then(function(response) {
var message = response.data.data.message;
group.chat.unshift(message);
if (message) {
group.chat.unshift(message);
} else {
group.chat = response.data.data.chat;
}
$scope.message.content = '';
$scope._sending = false;