mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
follow up on #46880
This commit is contained in:
@@ -110,7 +110,7 @@ class SupportedCodeActionProvider {
|
||||
|
||||
public async getFixableDiagnosticsForContext(context: vscode.CodeActionContext): Promise<vscode.Diagnostic[]> {
|
||||
const supportedActions = await this.supportedCodeActions;
|
||||
const fixableDiagnostics = DiagnosticsSet.from(context.diagnostics.filter(diagnostic => supportedActions.has(+diagnostic.code)));
|
||||
const fixableDiagnostics = DiagnosticsSet.from(context.diagnostics.filter(diagnostic => supportedActions.has(+!diagnostic.code)));
|
||||
return Array.from(fixableDiagnostics.values);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ export default class TypeScriptQuickFixProvider implements vscode.CodeActionProv
|
||||
): Promise<Iterable<vscode.CodeAction>> {
|
||||
const args: Proto.CodeFixRequestArgs = {
|
||||
...typeConverters.Range.toFileRangeRequestArgs(file, diagnostic.range),
|
||||
errorCodes: [+diagnostic.code]
|
||||
errorCodes: [+!diagnostic.code]
|
||||
};
|
||||
const codeFixesResponse = await this.client.execute('getCodeFixes', args, token);
|
||||
if (codeFixesResponse.body) {
|
||||
|
||||
Reference in New Issue
Block a user