diff --git a/app/assets/javascripts/discourse/models/category.js b/app/assets/javascripts/discourse/models/category.js index 49071428f40..4cc585a3f37 100644 --- a/app/assets/javascripts/discourse/models/category.js +++ b/app/assets/javascripts/discourse/models/category.js @@ -29,6 +29,10 @@ Discourse.Category = Discourse.Model.extend({ return Discourse.getURL("/category/") + Discourse.Category.slugFor(this); }.property('name'), + nameLower: function() { + return this.get('name').toLowerCase(); + }.property('name'), + unreadUrl: function() { return this.get('url') + '/l/unread'; }.property('url'), diff --git a/app/assets/javascripts/discourse/models/nav_item.js b/app/assets/javascripts/discourse/models/nav_item.js index 33986b1228b..365c6f1b8ed 100644 --- a/app/assets/javascripts/discourse/models/nav_item.js +++ b/app/assets/javascripts/discourse/models/nav_item.js @@ -21,7 +21,7 @@ Discourse.NavItem = Discourse.Model.extend({ categorySlug: function() { var split = this.get('name').split('/'); if (split[0] === 'category' && split[1]) { - var cat = Discourse.Site.current().categories.findProperty('name', split[1]); + var cat = Discourse.Site.current().categories.findProperty('nameLower', split[1].toLowerCase()); return cat ? Discourse.Category.slugFor(cat) : null; } return null;