Skip to content

Commit

Permalink
Fix tslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich committed Apr 6, 2021
1 parent 14c3751 commit 8062440
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions src/DotnetPack.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from "vscode";

const dotnetPackExtensionId = "ms-dotnettools.vscode-dotnet-pack";
Expand All @@ -8,16 +12,13 @@ export interface DotnetPackExtensionExports {

export async function getDotnetPackApi(): Promise<DotnetPackExtensionExports> {
const dotnetExtension = vscode.extensions.getExtension<DotnetPackExtensionExports>(dotnetPackExtensionId);
if (dotnetExtension) {
try {
if (!dotnetExtension.isActive) {
await dotnetExtension.activate();
}
if (!dotnetExtension) {
return null;
}

return dotnetExtension.exports;
}
catch {
}
if (!dotnetExtension.isActive) {
await dotnetExtension.activate();
}
return null;

return dotnetExtension.exports;
}
2 changes: 1 addition & 1 deletion src/features/codeActionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class CodeActionProvider extends AbstractProvider implements vsco

private async _runCodeAction(req: protocol.V2.RunCodeActionRequest, token: vscode.CancellationToken): Promise<boolean | string | {}> {

return serverUtils.runCodeAction(this._server, req).then(response => {
return serverUtils.runCodeAction(this._server, req).then(async response => {
if (response) {
return buildEditForResponse(response.Changes, this._languageMiddlewareFeature, token);
}
Expand Down

0 comments on commit 8062440

Please sign in to comment.