diff --git a/app/assets/javascripts/discourse/helpers/handlebars.js.es6 b/app/assets/javascripts/discourse/helpers/handlebars.js.es6 index 891b1ed9689..ce021cc2a50 100644 --- a/app/assets/javascripts/discourse/helpers/handlebars.js.es6 +++ b/app/assets/javascripts/discourse/helpers/handlebars.js.es6 @@ -5,7 +5,7 @@ Handlebars.registerHelper('handlebars', function(property, options) { if(params) { for(var prop in params){ - params[prop] = Em.Handlebars.get(this, params[prop]) || params[prop]; + params[prop] = Em.Handlebars.get(this, params[prop]); } } diff --git a/app/assets/javascripts/discourse/templates/list/category_column.raw.hbs b/app/assets/javascripts/discourse/templates/list/category_column.raw.hbs new file mode 100644 index 00000000000..5978e08b496 --- /dev/null +++ b/app/assets/javascripts/discourse/templates/list/category_column.raw.hbs @@ -0,0 +1,3 @@ +{{#unless hideCategory}} +{{category-link "category" showParent=true}} +{{/unless}} diff --git a/app/assets/javascripts/discourse/templates/list/topic_list_item.hbs b/app/assets/javascripts/discourse/templates/list/topic_list_item.hbs index b1ac5e6c443..e78d8f23e18 100644 --- a/app/assets/javascripts/discourse/templates/list/topic_list_item.hbs +++ b/app/assets/javascripts/discourse/templates/list/topic_list_item.hbs @@ -27,10 +27,7 @@ {{/if}} -{{#unless hideCategory}} -{{bound-category-link category showParent=true}} -{{/unless}} - +{{handlebars 'list/category_column' hideCategory=hideCategory category=category}} {{handlebars 'list/posters_column' posters=posters}} {{posts-count-column topic=model class="num" action="showTopicEntrance"}}