fixed an error during exit without launcher

This commit is contained in:
antelle 2021-05-08 11:42:08 +02:00
parent 0cbdd6281a
commit 2d6d3658a1
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 11 additions and 11 deletions

View File

@ -370,22 +370,22 @@ class AppView extends View {
}
let minimizeInsteadOfClose = this.model.settings.minimizeOnClose;
if (Launcher.quitOnRealQuitEventIfMinimizeOnQuitIsEnabled()) {
if (Launcher?.quitOnRealQuitEventIfMinimizeOnQuitIsEnabled()) {
minimizeInsteadOfClose = false;
}
if (this.model.files.hasDirtyFiles()) {
const exit = () => {
if (minimizeInsteadOfClose) {
Launcher.minimizeApp();
} else {
Launcher.exit();
}
};
if (Launcher && Launcher.exitRequested) {
return;
}
if (Launcher) {
const exit = () => {
if (minimizeInsteadOfClose) {
Launcher.minimizeApp();
} else {
Launcher.exit();
}
};
if (Launcher.exitRequested) {
return;
}
if (!this.exitAlertShown) {
if (this.model.settings.autoSave) {
this.saveAndLock(