From f5d257c7ae5b2c61283cb62c87b2c31921ee64cb Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Fri, 16 Aug 2019 11:28:49 -0700 Subject: [PATCH 1/2] null check on activeTerminal --- src/features/Console.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/Console.ts b/src/features/Console.ts index cedeb37769..e1daebc1a9 100644 --- a/src/features/Console.ts +++ b/src/features/Console.ts @@ -211,7 +211,7 @@ export class ConsoleFeature implements IFeature { return; } - if (vscode.window.activeTerminal.name !== "PowerShell Integrated Console") { + if (vscode.window.activeTerminal && vscode.window.activeTerminal.name !== "PowerShell Integrated Console") { this.log.write("PSIC is not active terminal. Running in active terminal using 'runSelectedText'"); await vscode.commands.executeCommand("workbench.action.terminal.runSelectedText"); From 52b9102b60b25ec4ae43df7b5999c76ecd72fa44 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Fri, 16 Aug 2019 11:37:37 -0700 Subject: [PATCH 2/2] newline for linting --- src/features/Console.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/Console.ts b/src/features/Console.ts index e1daebc1a9..cd06a4e9ea 100644 --- a/src/features/Console.ts +++ b/src/features/Console.ts @@ -211,7 +211,8 @@ export class ConsoleFeature implements IFeature { return; } - if (vscode.window.activeTerminal && vscode.window.activeTerminal.name !== "PowerShell Integrated Console") { + if (vscode.window.activeTerminal && + vscode.window.activeTerminal.name !== "PowerShell Integrated Console") { this.log.write("PSIC is not active terminal. Running in active terminal using 'runSelectedText'"); await vscode.commands.executeCommand("workbench.action.terminal.runSelectedText");