Use finally

This commit is contained in:
Matt Bierner 2019-04-29 11:07:35 -07:00
parent 8fe2d38edc
commit af722a281a

View file

@ -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);
});
}