diff --git a/browser/main/lib/ConfigManager.js b/browser/main/lib/ConfigManager.js index 85310e5c..a1868047 100644 --- a/browser/main/lib/ConfigManager.js +++ b/browser/main/lib/ConfigManager.js @@ -154,7 +154,13 @@ function get () { function set (updates) { const currentConfig = get() - const newConfig = Object.assign({}, DEFAULT_CONFIG, currentConfig, updates) + + let arrangedUpdates = updates + if (updates.preview !== undefined && updates.preview.customCSS === "") { + arrangedUpdates.preview.customCSS = DEFAULT_CONFIG.preview.customCSS + } + + const newConfig = Object.assign({}, DEFAULT_CONFIG, currentConfig, arrangedUpdates); if (!validate(newConfig)) throw new Error('INVALID CONFIG') _save(newConfig)