Fix lanugage detection

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2017-11-04 16:38:26 -06:00
parent 4f1ad974fc
commit c7eee36990
2 changed files with 8 additions and 7 deletions

View file

@ -55,8 +55,7 @@ export default class LanguageDropdown extends React.Component {
// If no value is given, we start with the first
// country selected, but our parent component
// doesn't know this, therefore we do this.
// TODO: {Travis} Ensure the default is *not* used for this check. It should try and use the browser.
const language = SettingsStore.getValue("language");
const language = SettingsStore.getValue("language", null, /*excludeDefault:*/true);
if (language) {
this.props.onOptionChange(language);
}else {
@ -97,8 +96,7 @@ export default class LanguageDropdown extends React.Component {
// default value here too, otherwise we need to handle null / undefined
// values between mounting and the initial value propgating
// TODO: {Travis} Ensure the default is *not* used for this check. It should try and use the browser.
let language = SettingsStore.getValue("language");
let language = SettingsStore.getValue("language", null, /*excludeDefault:*/true);
let value = null;
if (language) {
value = this.props.value || language;