mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
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:
parent
67979b2b21
commit
0e0c70019b
1 changed files with 1 additions and 6 deletions
|
@ -194,12 +194,7 @@ const Topic = RestModel.extend({
|
||||||
@discourseComputed("suggested_topics")
|
@discourseComputed("suggested_topics")
|
||||||
suggestedTopics(suggestedTopics) {
|
suggestedTopics(suggestedTopics) {
|
||||||
if (suggestedTopics) {
|
if (suggestedTopics) {
|
||||||
const store = this.store;
|
return suggestedTopics.map((st) => this.store.createRecord("topic", st));
|
||||||
|
|
||||||
return this.set(
|
|
||||||
"suggested_topics",
|
|
||||||
suggestedTopics.map((st) => store.createRecord("topic", st))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue