From ed9a8cabd6b4f9c0dc0c5e5a206c6a9aa4278492 Mon Sep 17 00:00:00 2001 From: Quentin Decaunes Date: Sun, 2 Jun 2019 20:56:01 +0200 Subject: [PATCH] Ensure settings are correctly saved when upgrading. --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index d7a146c..d857693 100644 --- a/main.js +++ b/main.js @@ -26,12 +26,6 @@ if (old_version !== new_version) { settings.delete('settings.ryzen_adj_path'); } - settings.set('settings', { - ...settings.set('settings'), - last_used_version: require('./package.json').version, - first_launch: true, - }); - /** * Since 1.11.0 we added new settings and apply checkbox, * We need to add new settings to presets. @@ -91,6 +85,12 @@ if (old_version !== new_version) { settings.set('presets', update_presets_to_1_11_0(settings.get('presets'))); settings.set('latest_controller_tabs_settings', update_latest_settings_to_1_11_0(settings.get('latest_controller_tabs_settings'))); } + + settings.set('settings', { + ...settings.set('settings'), + last_used_version: require('./package.json').version, + first_launch: true, + }); } // Keep a global reference of the window object, if you don't, the window will