提交 af722a28 编写于 作者: M Matt Bierner

Use finally

上级 8fe2d38e
...@@ -289,11 +289,8 @@ class CodeActionOnSaveParticipant implements ISaveParticipant { ...@@ -289,11 +289,8 @@ class CodeActionOnSaveParticipant implements ISaveParticipant {
reject(localize('codeActionsOnSave.didTimeout', "Aborted codeActionsOnSave after {0}ms", timeout)); reject(localize('codeActionsOnSave.didTimeout', "Aborted codeActionsOnSave after {0}ms", timeout));
}, timeout)), }, timeout)),
this.applyOnSaveActions(model, codeActionsOnSave, tokenSource.token) this.applyOnSaveActions(model, codeActionsOnSave, tokenSource.token)
]).then(() => { ]).finally(() => {
tokenSource.cancel(); tokenSource.cancel();
}, (e) => {
tokenSource.cancel();
return Promise.reject(e);
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册