options: make sure nonLauncher options are kept in store and not save in config files

This commit is contained in:
bordun 2020-04-25 13:15:39 +02:00
parent eb982c7960
commit b15704ed68
2 changed files with 4 additions and 1 deletions

View file

@ -81,7 +81,7 @@ class Settings {
write(tmp) {
for (var i in this.options) {
if (this.options[i] === '') {
if (this.options[i] === '' || !this.names.includes(i)) {
delete this.options[i]
}
}

View file

@ -124,6 +124,9 @@ if (configPathExists) {
}
} else {
for (let k in config) {
if (k === 'options') {
Object.assign(config.options, settings.options)
}
settings[k] = config[k]
}
}