SharedPreferences: fixes so UI Theme can be set back to Default (#24628)

This commit is contained in:
Agnès Toulet 2020-05-13 15:08:49 +02:00 committed by GitHub
parent c1b057a57d
commit cd9cbe5e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ export class SharedPreferences extends PureComponent<Props, State> {
}; };
onThemeChanged = (theme: SelectableValue<string>) => { onThemeChanged = (theme: SelectableValue<string>) => {
if (!theme || !theme.value) { if (!theme || typeof theme.value !== 'string') {
return; return;
} }
this.setState({ theme: theme.value }); this.setState({ theme: theme.value });