From 98a14e9a6a1d0f748ca3f83981aa2a590c58c2f6 Mon Sep 17 00:00:00 2001 From: lilia Date: Sun, 2 Aug 2015 10:10:43 -0700 Subject: [PATCH] Fix bug in message model conversation.changedAttributes returns false when there are no changes. --- js/models/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/models/messages.js b/js/models/messages.js index c0bac917885..6cd1fb29d4f 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -154,7 +154,7 @@ avatar : dataMessage.group.avatar, members : dataMessage.group.members, }; - group_update = conversation.changedAttributes(_.pick(dataMessage.group, 'name', 'avatar')); + group_update = conversation.changedAttributes(_.pick(dataMessage.group, 'name', 'avatar')) || {}; var difference = _.difference(dataMessage.group.members, conversation.get('members')); if (difference.length > 0) { group_update.joined = difference;