diff --git a/app/assets/javascripts/discourse/controllers/site-map-category.js.es6 b/app/assets/javascripts/discourse/controllers/site-map-category.js.es6 index 52da588ccfd..0fcce87f972 100644 --- a/app/assets/javascripts/discourse/controllers/site-map-category.js.es6 +++ b/app/assets/javascripts/discourse/controllers/site-map-category.js.es6 @@ -1,10 +1,10 @@ -export default Ember.ObjectController.extend({ +export default Ember.Controller.extend({ needs: ['site-map'], unreadTotal: function() { - return parseInt(this.get('unreadTopics'), 10) + - parseInt(this.get('newTopics'), 10); - }.property('unreadTopics', 'newTopics'), + return parseInt(this.get('model.unreadTopics'), 10) + + parseInt(this.get('model.newTopics'), 10); + }.property('model.unreadTopics', 'model.newTopics'), showTopicCount: Em.computed.not('currentUser') }); diff --git a/app/assets/javascripts/discourse/templates/site-map.hbs b/app/assets/javascripts/discourse/templates/site-map.hbs index c4e4b457792..243082e0354 100644 --- a/app/assets/javascripts/discourse/templates/site-map.hbs +++ b/app/assets/javascripts/discourse/templates/site-map.hbs @@ -65,14 +65,14 @@ {{#each c in categories itemController='site-map-category'}}
  • - {{category-link c allowUncategorized="true"}} + {{category-link c.model allowUncategorized="true"}} {{#if c.unreadTotal}} - {{c.unreadTotal}} + {{c.unreadTotal}} {{/if}} {{#if c.showTopicCount}} - {{unbound c.topic_count}} + {{unbound c.model.topic_count}} {{/if}}
  • {{/each}}