FIX: incorrect label for top topics dropdown on mobile when filtering

This commit is contained in:
Arpit Jalan 2017-05-01 16:43:23 +05:30
parent dafc4ec906
commit 9e9ead0954

View File

@ -13,7 +13,8 @@ export default Ember.Component.extend({
},
@computed("filterMode", "navItems")
selectedNavItem(filterMode, navItems){
selectedNavItem(filterMode, navItems) {
if (filterMode.indexOf("top/") === 0) { filterMode = "top"; }
var item = navItems.find(i => i.get('filterMode').indexOf(filterMode) === 0);
return item || navItems[0];
},