From b985228160ef91698bc505d69d3f5c4eb3e87dce Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 18 Jul 2017 13:54:57 -0700 Subject: [PATCH] Last seen indicator/scroll down button - defensive removal FREEBIE --- js/views/conversation_view.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 3e4cb5c43..cc8973ebc 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -366,15 +366,17 @@ removeScrollDownButton: function() { if (this.scrollDownButton) { - this.scrollDownButton.remove(); + var button = this.scrollDownButton; this.scrollDownButton = null; + button.remove(); } }, removeLastSeenIndicator: function() { if (this.lastSeenIndicator) { - this.lastSeenIndicator.remove(); + var indicator = this.lastSeenIndicator; this.lastSeenIndicator = null; + indicator.remove(); } },