editors - make sure to always remove pending confirmations even in error case
This commit is contained in:
parent
4342faa67c
commit
3feb8937a8
1 changed files with 6 additions and 4 deletions
|
@ -1347,10 +1347,12 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
|
|||
this.mapEditorToPendingConfirmation.set(editor, handleDirtyClosingPromise);
|
||||
}
|
||||
|
||||
const veto = await handleDirtyClosingPromise;
|
||||
|
||||
// Make sure to remove from our map of cached pending confirmations
|
||||
this.mapEditorToPendingConfirmation.delete(editor);
|
||||
let veto: boolean;
|
||||
try {
|
||||
veto = await handleDirtyClosingPromise;
|
||||
} finally {
|
||||
this.mapEditorToPendingConfirmation.delete(editor);
|
||||
}
|
||||
|
||||
// Return for the first veto we got
|
||||
if (veto) {
|
||||
|
|
Loading…
Reference in a new issue