From 88306cc112498f7ffec33e7d09c913fc826722fa Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 2 Feb 2015 19:34:28 +0530 Subject: [PATCH] FIX: uncategorized category was not loading updates in edit mode --- .../discourse/routes/application.js.es6 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/discourse/routes/application.js.es6 b/app/assets/javascripts/discourse/routes/application.js.es6 index 83f8a53a7ec..34ca877387f 100644 --- a/app/assets/javascripts/discourse/routes/application.js.es6 +++ b/app/assets/javascripts/discourse/routes/application.js.es6 @@ -132,18 +132,13 @@ var ApplicationRoute = Discourse.Route.extend({ }, editCategory: function(category) { - var router = this; + var self = this; - if (category.get('isUncategorizedCategory')) { - Discourse.Route.showModal(router, 'editCategory', category); - router.controllerFor('editCategory').set('selectedTab', 'general'); - } else { - Discourse.Category.reloadById(category.get('id')).then(function (c) { - Discourse.Site.current().updateCategory(c); - Discourse.Route.showModal(router, 'editCategory', c); - router.controllerFor('editCategory').set('selectedTab', 'general'); - }); - } + Discourse.Category.reloadById(category.get('id')).then(function (c) { + self.site.updateCategory(c); + Discourse.Route.showModal(self, 'editCategory', c); + self.controllerFor('editCategory').set('selectedTab', 'general'); + }); }, /**