From a2bb33b6d7837b07617530b3e54eb83fb7c59ca2 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 11 May 2020 17:05:05 +0200 Subject: [PATCH] REFACTOR: Remove an unused Topic model observer (#9723) As far I can tell nothing sets categoryName on the Topic model. Didn't find anything in all-the-plugins/all-the-themes either. --- app/assets/javascripts/discourse/app/models/topic.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/assets/javascripts/discourse/app/models/topic.js b/app/assets/javascripts/discourse/app/models/topic.js index 573104b6eb3..f7ec6ead943 100644 --- a/app/assets/javascripts/discourse/app/models/topic.js +++ b/app/assets/javascripts/discourse/app/models/topic.js @@ -236,16 +236,6 @@ const Topic = RestModel.extend({ this.set("category", Category.findById(this.category_id)); }, - @observes("categoryName") - _categoryNameChanged() { - const categoryName = this.categoryName; - let category; - if (categoryName) { - category = this.site.get("categories").findBy("name", categoryName); - } - this.set("category", category); - }, - categoryClass: fmt("category.fullSlug", "category-%@"), @discourseComputed("tags")