A platform for community discussion. Free, open, simple.
FIX: Unsubscribe from the `/reviewable_counts` channel when leaving the review-index route (#17778)
Osama Sayegh3d7829c01fe3
diff --git a/app/assets/javascripts/discourse/app/routes/review-index.js b/app/assets/javascripts/discourse/app/routes/review-index.jsindex 4d89d8154af..fbe993f864e 100644--- a/app/assets/javascripts/discourse/app/routes/review-index.js+++ b/app/assets/javascripts/discourse/app/routes/review-index.js@@ -82,6 +82,10 @@ export default DiscourseRoute.extend({deactivate() {this.messageBus.unsubscribe("/reviewable_claimed");+ const channel = this.currentUser.enable_redesigned_user_menu+ ? `/reviewable_counts/${this.currentUser.id}`+ : "/reviewable_counts";+ this.messageBus.unsubscribe(channel);},@action