提交 02006fe9 编写于 作者: M Matt Bierner

fixes #20815. Workaround to not send code actions request if we have no actions

上级 c504b1d6
...@@ -58,6 +58,9 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider ...@@ -58,6 +58,9 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider
}; };
return this.getSupportedCodeActions(context) return this.getSupportedCodeActions(context)
.then(supportedActions => { .then(supportedActions => {
if (!supportedActions.length) {
return Promise.reject('no actions');
}
return this.client.execute('getCodeFixes', { return this.client.execute('getCodeFixes', {
file: file, file: file,
startLine: range.start.line + 1, startLine: range.start.line + 1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册