FIX: Bug when sorting by category column, navigating to home

This commit is contained in:
Robin Ward 2014-10-10 12:17:53 -04:00
parent d3b268cd2c
commit ac72b0bcf6
2 changed files with 7 additions and 2 deletions

View File

@ -79,7 +79,9 @@ export default function(filter, params) {
category: model, category: model,
period: periods.findBy('id', periodId), period: periods.findBy('id', periodId),
selected: [], selected: [],
noSubcategories: params && !!params.no_subcategories noSubcategories: params && !!params.no_subcategories,
order: model.get('params.order'),
ascending: model.get('params.ascending'),
}); });
this.controllerFor('search').set('searchContext', model.get('searchContext')); this.controllerFor('search').set('searchContext', model.get('searchContext'));

View File

@ -45,6 +45,7 @@ export default function(filter, extras) {
return 'queryParams.' + v; return 'queryParams.' + v;
}))); })));
var periods = this.controllerFor('discovery').get('periods'), var periods = this.controllerFor('discovery').get('periods'),
periodId = model.get('for_period') || (filter.indexOf('/') > 0 ? filter.split('/')[1] : ''); periodId = model.get('for_period') || (filter.indexOf('/') > 0 ? filter.split('/')[1] : '');
@ -52,7 +53,9 @@ export default function(filter, extras) {
model: model, model: model,
category: null, category: null,
period: periods.findBy('id', periodId), period: periods.findBy('id', periodId),
selected: [] selected: [],
order: model.get('params.order'),
ascending: model.get('params.ascending'),
}); });
this.openTopicDraft(model); this.openTopicDraft(model);