diff --git a/app/assets/javascripts/discourse/app/models/topic.js b/app/assets/javascripts/discourse/app/models/topic.js index 98b0669f728..604fda2a6bd 100644 --- a/app/assets/javascripts/discourse/app/models/topic.js +++ b/app/assets/javascripts/discourse/app/models/topic.js @@ -554,6 +554,7 @@ const Topic = RestModel.extend({ } } keys.forEach(key => this.set(key, json[key])); + return this; }, reload() { diff --git a/test/javascripts/components/select-kit/topic-notifications-button-test.js b/test/javascripts/components/select-kit/topic-notifications-button-test.js index 6f2f2861cc3..fd23bdf7923 100644 --- a/test/javascripts/components/select-kit/topic-notifications-button-test.js +++ b/test/javascripts/components/select-kit/topic-notifications-button-test.js @@ -5,7 +5,8 @@ import Topic from "discourse/models/topic"; const buildTopic = function(level, archetype = "regular") { return Topic.create({ - id: 4563, + id: 4563 + }).updateFromJson({ title: "Qunit Test Topic", details: { notification_level: level