From 0fca5ed533a123d75c45c84375199ac2079c9ca3 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 6 Sep 2017 19:59:23 +0200 Subject: [PATCH] FIX: stricter check on presence of notification_level_change When `notification_level_change` was `0` it was evaluating to false --- app/assets/javascripts/discourse/controllers/topic.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index 79d10418bbe..bb8500f08d9 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -827,7 +827,7 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { this.messageBus.subscribe(`/topic/${this.get('model.id')}`, data => { const topic = this.get('model'); - if (data.notification_level_change) { + if (Ember.isPresent(data.notification_level_change)) { topic.set('details.notification_level', data.notification_level_change); topic.set('details.notifications_reason_id', data.notifications_reason_id); return;