fix: Fixed a bug when cancel button is selected in "Reset Application" menu

This commit is contained in:
Ivan Prodanov
2022-10-01 18:12:35 +03:00
parent 469b4a75b7
commit 8fd3108b7e

2
app.js
View File

@@ -391,6 +391,7 @@ function getMenu() {
buttons: ['Reset Everything!', 'Reset Windows', 'Cancel'],
})
.then((res) => {
if (res.response !== 2) {
if (res.response === 0) {
config.clear();
mainWindow.webContents.session.clearCache();
@@ -405,6 +406,7 @@ function getMenu() {
app.relaunch();
app.exit();
}
});
},
},