pull/1020/head
Audric Ackermann 6 years ago
parent 8f01d1dbb7
commit e48c7c2f3d
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1026,7 +1026,7 @@
const currentValue = window.getSettingValue('spell-check'); const currentValue = window.getSettingValue('spell-check');
// if undefined, it means 'default' so true. but we have to toggle it, so false // if undefined, it means 'default' so true. but we have to toggle it, so false
// if not undefined, we take the opposite // if not undefined, we take the opposite
const newValue = currentValue !== undefined? !currentValue : false; const newValue = currentValue !== undefined ? !currentValue : false;
window.Events.setSpellCheck(newValue); window.Events.setSpellCheck(newValue);
window.pushToast({ window.pushToast({
description: window.i18n('spellCheckDirty'), description: window.i18n('spellCheckDirty'),

@ -116,8 +116,14 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
const description = setting.description || ''; const description = setting.description || '';
const comparisonValue = setting.comparisonValue || null; const comparisonValue = setting.comparisonValue || null;
const storedSetting = window.getSettingValue(setting.id, comparisonValue); const storedSetting = window.getSettingValue(
const value = storedSetting !== undefined ? storedSetting : setting.content && setting.content.defaultValue; setting.id,
comparisonValue
);
const value =
storedSetting !== undefined
? storedSetting
: setting.content && setting.content.defaultValue;
const sliderFn = const sliderFn =
setting.type === SessionSettingType.Slider setting.type === SessionSettingType.Slider

Loading…
Cancel
Save