diff --git a/browser/main/lib/ConfigManager.js b/browser/main/lib/ConfigManager.js index b8acb324..8069ce0a 100644 --- a/browser/main/lib/ConfigManager.js +++ b/browser/main/lib/ConfigManager.js @@ -71,17 +71,17 @@ function get () { config = Object.assign({}, DEFAULT_CONFIG, JSON.parse(config)) if (boostnotercConfig !== undefined) { + config = Object.assign({}, DEFAULT_CONFIG, boostnotercConfig) config.hotkey = Object.assign({}, DEFAULT_CONFIG.hotkey, boostnotercConfig.hotkey) config.ui = Object.assign({}, DEFAULT_CONFIG.ui, boostnotercConfig.ui) config.editor = Object.assign({}, DEFAULT_CONFIG.editor, boostnotercConfig.editor) config.preview = Object.assign({}, DEFAULT_CONFIG.preview, boostnotercConfig.preview) } - config = Object.assign(config, DEFAULT_CONFIG, config) - config.hotkey = Object.assign(config, DEFAULT_CONFIG.hotkey, config.hotkey) - config.ui = Object.assign(config, DEFAULT_CONFIG.ui, config.ui) - config.editor = Object.assign(config, DEFAULT_CONFIG.editor, config.editor) - config.preview = Object.assign(config, DEFAULT_CONFIG.preview, config.preview) + config.hotkey = Object.assign({}, DEFAULT_CONFIG.hotkey, config.hotkey) + config.ui = Object.assign({}, DEFAULT_CONFIG.ui, config.ui) + config.editor = Object.assign({}, DEFAULT_CONFIG.editor, config.editor) + config.preview = Object.assign({}, DEFAULT_CONFIG.preview, config.preview) if (!validate(config)) throw new Error('INVALID CONFIG') } catch (err) {