FIX: defer topic was broken

FIX: defer topic was broken

diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js
index c6277af..6337c8d 100644
--- a/app/assets/javascripts/discourse/app/controllers/topic.js
+++ b/app/assets/javascripts/discourse/app/controllers/topic.js
@@ -456,7 +456,8 @@ export default Controller.extend(bufferedProperty("model"), {
     },
 
     deferTopic() {
-      const { screenTrack, currentUser, topic } = this;
+      const { screenTrack, currentUser } = this;
+      const topic = this.model;
 
       screenTrack.reset();
       screenTrack.stop();

GitHub sha: 51a6e96b

@eviltrout

Just a btw/fyi (though not sure if more readable :man_shrugging:):

const { screenTrack, currentUser, model: topic } = this;
1 Like

Thanks @CvX my knowledge of destructuring is not as good as it should be!

1 Like