From 17deb69a916249dc8861074fff2f3441e323602c Mon Sep 17 00:00:00 2001 From: lilia Date: Sun, 25 Jan 2015 15:50:00 -1000 Subject: [PATCH] Make conversation panel work with a new contact Prevent view from fetching messages without an id, as this causes a crash. --- js/views/conversation_view.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index deebcbb9a..b5a615aaf 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -39,7 +39,9 @@ }); this.$el.find('.discussion-container').append(this.view.el); - this.model.fetchMessages({reset: true}); + if (this.model.id) { + this.model.fetchMessages({reset: true}); + } }, events: {