From 3629429742505c037975b3175a24cbb2006d9d69 Mon Sep 17 00:00:00 2001 From: Emil HAMMARSTEDT Date: Wed, 13 Dec 2023 08:51:14 +0100 Subject: [PATCH] fix: Cannot quit app when there is a dirty editor (#13164) Contributed by STMicroelectronics Signed-off-by: Emil HAMMARSTEDT --- .../core/src/browser/common-frontend-contribution.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/core/src/browser/common-frontend-contribution.ts b/packages/core/src/browser/common-frontend-contribution.ts index f436fcf2349b4..8ff7db3028918 100644 --- a/packages/core/src/browser/common-frontend-contribution.ts +++ b/packages/core/src/browser/common-frontend-contribution.ts @@ -1204,14 +1204,8 @@ export class CommonFrontendContribution implements FrontendApplicationContributi await this.saveDirty(untitledCaptionsToSave); await this.shell.saveAll(); }); - if (this.shell.canSaveAll()) { - this.shouldPreventClose = true; - return false; - } else { - this.shouldPreventClose = false; - return result; - } - + this.shouldPreventClose = !result; + return result; } }; }