Use finally
This commit is contained in:
parent
8fe2d38edc
commit
af722a281a
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue