mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Fix error when trying to edit a category with empty slug
This commit is contained in:
parent
82b5f57e40
commit
a53f958c78
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ Discourse.ApplicationRoute = Em.Route.extend({
|
||||||
Discourse.Route.showModal(router, 'editCategory', category);
|
Discourse.Route.showModal(router, 'editCategory', category);
|
||||||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||||
} else {
|
} 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.Site.instance().updateCategory(c);
|
||||||
Discourse.Route.showModal(router, 'editCategory', c);
|
Discourse.Route.showModal(router, 'editCategory', c);
|
||||||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||||
|
|
Loading…
Reference in a new issue