Skip to content

Commit

Permalink
Fix exception on sendScript to terminal if no terminals are open
Browse files Browse the repository at this point in the history
  • Loading branch information
esarver committed Jan 17, 2025
1 parent 2325c52 commit 7bf6fed
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function activate(context: vscode.ExtensionContext) {
const term = vscode.window.activeTerminal
if (
(term?.creationOptions as vscode.TerminalOptions)
.shellPath === EXECUTABLE
?.shellPath === EXECUTABLE
) {
let connection: Connection | undefined = undefined
for (const i of InstrumentProvider.instance.instruments) {
Expand Down Expand Up @@ -571,9 +571,8 @@ const base_api = {
fetchKicTerminals(): vscode.Terminal[] {
const kicTerminals = vscode.window.terminals.filter(
(t) =>
(
t.creationOptions as vscode.TerminalOptions
)?.shellPath?.toString() === EXECUTABLE,
(t.creationOptions as vscode.TerminalOptions)?.shellPath ===
EXECUTABLE,
)
return kicTerminals
},
Expand Down

0 comments on commit 7bf6fed

Please sign in to comment.