Skip to content

Commit

Permalink
Fixes js/ts quick fixes
Browse files Browse the repository at this point in the history
Fixes #47002

Use the correct grouping for the not null assertion
  • Loading branch information
mjbvz committed Apr 2, 2018
1 parent e53d0cd commit 0dd7c79
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0dd7c79

Please sign in to comment.