ignore request for codefixes with no error codes (#14215)

This commit is contained in:
Vladimir Matveev 2017-02-21 13:59:33 -08:00 committed by GitHub
parent dca368b719
commit 359823b4be

View file

@ -1412,6 +1412,9 @@ namespace ts.server {
}
private getCodeFixes(args: protocol.CodeFixRequestArgs, simplifiedResult: boolean): protocol.CodeAction[] | CodeAction[] {
if (args.errorCodes.length === 0) {
return undefined;
}
const { file, project } = this.getFileAndProjectWithoutRefreshingInferredProjects(args);
const scriptInfo = project.getScriptInfoForNormalizedPath(file);