Skip to content

Commit 39fa41a

Browse files
committed
🤖 refactor: remove redundant SSH type check
The isSSH check already validates runtimeConfig.type === "ssh", so the redundant check in the if condition is unnecessary. Generated with `cmux`
1 parent 4666e32 commit 39fa41a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/ipcMain.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,9 @@ export class IpcMain {
919919
const runtimeConfig = workspace.runtimeConfig;
920920
const isSSH = runtimeConfig?.type === "ssh";
921921

922-
if (isSSH && runtimeConfig.type === "ssh") {
922+
if (isSSH) {
923923
// SSH workspace - spawn local terminal that SSHs into remote host
924+
// Type assertion is safe because isSSH === true means runtimeConfig.type === "ssh"
924925
await this.openTerminal({
925926
type: "ssh",
926927
sshConfig: runtimeConfig,

0 commit comments

Comments
 (0)