Skip to content

Commit

Permalink
fix file-saving dialog
Browse files Browse the repository at this point in the history
This commit fixes the issue where cancelling the file-saving dialog
incorrectly closes the editor.

Signed-off-by: Vlad Arama <[email protected]>
  • Loading branch information
Vlad Arama committed Aug 25, 2023
1 parent 628d6d2 commit b4e91d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/browser/saveable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ export namespace Saveable {
if (typeof result === 'boolean') {
if (result) {
await (doSave?.(this) ?? Saveable.save(this));
if (!isDirty(this)) {
await this.closeWithoutSaving();
}
} else {
await this.closeWithoutSaving();
}
await this.closeWithoutSaving();
}
} finally {
closing = false;
Expand Down

0 comments on commit b4e91d1

Please sign in to comment.