diff --git a/app/assets/javascripts/discourse/components/screen_track.js b/app/assets/javascripts/discourse/components/screen_track.js index 00760df4739..c5f7c7947b0 100644 --- a/app/assets/javascripts/discourse/components/screen_track.js +++ b/app/assets/javascripts/discourse/components/screen_track.js @@ -14,6 +14,11 @@ Discourse.ScreenTrack = Ember.Object.extend({ }, start: function(topicId) { + var currentTopicId = this.get('topicId'); + if (currentTopicId && (currentTopicId !== topicId)) { + this.tick(); + this.flush(); + } this.reset(); @@ -25,11 +30,6 @@ Discourse.ScreenTrack = Ember.Object.extend({ }, 1000)); } - var currentTopicId = this.get('topicId'); - if (currentTopicId && (currentTopicId !== topicId)) { - this.flush(); - this.reset(); - } this.set('topicId', topicId); },