Fix error when trying to edit a category with empty slug
This commit is contained in:
parent
82b5f57e40
commit
a53f958c78
|
@ -41,7 +41,8 @@ Discourse.ApplicationRoute = Em.Route.extend({
|
|||
Discourse.Route.showModal(router, 'editCategory', category);
|
||||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
} else {
|
||||
Discourse.Category.findBySlugOrId(category.get('slug')).then(function (c) {
|
||||
Discourse.Category.findBySlugOrId(category.get('slug') || category.get('id')).then(function (c) {
|
||||
console.log('ok show it now please');
|
||||
Discourse.Site.instance().updateCategory(c);
|
||||
Discourse.Route.showModal(router, 'editCategory', c);
|
||||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
|
|
Loading…
Reference in New Issue