DEV: Replace the Topic.category observer

Fixes an issue in Ember CLI environment
This commit is contained in:
Jarek Radosz 2020-11-07 02:18:58 +01:00 committed by Robin Ward
parent 811c610108
commit fe2c3e3e38
1 changed files with 3 additions and 4 deletions

View File

@ -227,10 +227,9 @@ const Topic = RestModel.extend({
return { type: "topic", id };
},
@on("init")
@observes("category_id")
_categoryIdChanged() {
this.set("category", Category.findById(this.category_id));
@discourseComputed("category_id")
category(categoryId) {
return Category.findById(categoryId);
},
categoryClass: fmt("category.fullSlug", "category-%@"),