mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Use finally
This commit is contained in:
@@ -289,11 +289,8 @@ class CodeActionOnSaveParticipant implements ISaveParticipant {
|
||||
reject(localize('codeActionsOnSave.didTimeout', "Aborted codeActionsOnSave after {0}ms", timeout));
|
||||
}, timeout)),
|
||||
this.applyOnSaveActions(model, codeActionsOnSave, tokenSource.token)
|
||||
]).then(() => {
|
||||
]).finally(() => {
|
||||
tokenSource.cancel();
|
||||
}, (e) => {
|
||||
tokenSource.cancel();
|
||||
return Promise.reject(e);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user