FIX: stricter check on presence of notification_level_change

When `notification_level_change` was `0` it was evaluating to false
This commit is contained in:
Joffrey JAFFEUX 2017-09-06 19:59:23 +02:00 committed by GitHub
parent 825452df76
commit 0fca5ed533
1 changed files with 1 additions and 1 deletions

View File

@ -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;