Fix "sort by" dropdown being empty

Must be something in the latest version of Chrome that caused this to start being a problem, because @franzliedke started experiencing it a few days ago, and I only just experienced it for the first time yesterday.
This commit is contained in:
Toby Zerner 2016-03-18 09:37:25 +10:30
parent 41f48deddc
commit 1a95764909

View File

@ -213,7 +213,7 @@ export default class IndexPage extends Page {
items.add('sort', items.add('sort',
Select.component({ Select.component({
options: sortOptions, options: sortOptions,
value: this.params().sort, value: this.params().sort || Object.keys(app.cache.discussionList.sortMap())[0],
onchange: this.changeSort.bind(this) onchange: this.changeSort.bind(this)
}) })
); );