Skip to content

Commit

Permalink
Fix language dropdown sorting
Browse files Browse the repository at this point in the history
fix #2611
  • Loading branch information
jowlo committed Jan 13, 2021
1 parent d6451cb commit e10e8a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/settings/AppearanceSettingsViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export class AppearanceSettingsViewer implements UpdatableSettingsViewer {
label: "language_label",
items: languages.map(language => {
return {name: lang.get(language.textId), value: language.code}
}).concat({name: lang.get("automatic_label"), value: null}),
}).sort((l1, l2) => l1.name.localeCompare(l2.name))
.concat({name: lang.get("automatic_label"), value: null}),
// DropdownSelectorN uses `===` to compare items so if the language is not set then `undefined` will not match `null`
selectedValue: stream(deviceConfig.getLanguage() || null),
selectionChangedHandler: (value) => {
Expand Down

0 comments on commit e10e8a2

Please sign in to comment.