FIX: Suggested Topics was being set inside a computed property

This is bad because changing the `suggested_topics` proeprty could cause
a `set` on `suggested_topics`.
This commit is contained in:
Robin Ward 2020-11-23 15:53:48 -05:00
parent 67979b2b21
commit 0e0c70019b

View File

@ -194,12 +194,7 @@ const Topic = RestModel.extend({
@discourseComputed("suggested_topics")
suggestedTopics(suggestedTopics) {
if (suggestedTopics) {
const store = this.store;
return this.set(
"suggested_topics",
suggestedTopics.map((st) => store.createRecord("topic", st))
);
return suggestedTopics.map((st) => this.store.createRecord("topic", st));
}
},