Fix bug on new post creation where we would try to hide an element that wasn't there

This commit is contained in:
Brian Jacobel
2016-12-15 10:04:48 -05:00
parent fd0cf4041e
commit 0e5f6c2e6f

View File

@@ -156,9 +156,11 @@
this.$('.inline-thread').addClass('is-hidden');
// Delete the thread view
this.threadView.$el.empty().off();
this.threadView.stopListening();
this.threadView = null;
if (this.threadView) {
this.threadView.$el.empty().off();
this.threadView.stopListening();
this.threadView = null;
}
// Show the thread list view
this.threadListView.$el.removeClass('is-hidden');