Skip to content

Commit e2e322f

Browse files
null check on activeTerminal to workaround vscode behavior (#2141)
* null check on activeTerminal * newline for linting
1 parent 66a39de commit e2e322f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/features/Console.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ export class ConsoleFeature implements IFeature {
211211
return;
212212
}
213213

214-
if (vscode.window.activeTerminal.name !== "PowerShell Integrated Console") {
214+
if (vscode.window.activeTerminal &&
215+
vscode.window.activeTerminal.name !== "PowerShell Integrated Console") {
215216
this.log.write("PSIC is not active terminal. Running in active terminal using 'runSelectedText'");
216217
await vscode.commands.executeCommand("workbench.action.terminal.runSelectedText");
217218

0 commit comments

Comments
 (0)