sanitize export config values

main
Mike Fix 5 years ago
parent baf6ec89be
commit fcd5cee30b
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -11,7 +11,7 @@ import Popout, { managePopout } from './Popout'
import Button from './Button'
import Presets from './Presets'
import MenuButton from './MenuButton'
import { COLORS, DEFAULT_PRESETS } from '../lib/constants'
import { COLORS, DEFAULT_PRESETS, DEFAULT_SETTINGS } from '../lib/constants'
import { toggle, getPresets, savePresets, generateId, fileToJSON } from '../lib/util'
import SettingsIcon from './svg/Settings'
@ -287,7 +287,7 @@ class Settings extends React.PureComponent {
}
getSettingsFromProps = () =>
omitBy(this.props, (v, k) => typeof v === 'function' || k === 'preset')
omitBy(this.props, (v, k) => !Object.prototype.hasOwnProperty.call(DEFAULT_SETTINGS, k))
applyPreset = preset => {
const previousSettings = this.getSettingsFromProps()

Loading…
Cancel
Save