Skip to content

Commit

Permalink
ignore possible error when deleting disposed terminal (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eskibear authored Apr 12, 2018
1 parent 0513db6 commit 80e8248
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/VSCodeUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export namespace VSCodeUI {
if (terminal) {
terminal.sendText(composeSetEnvironmentVariableCommand("JAVA_HOME", javaHome), true);
}
return {JAVA_HOME: javaHome};
return { JAVA_HOME: javaHome };
} else {
return {};
}
Expand All @@ -114,7 +114,11 @@ export namespace VSCodeUI {
}

export function onDidCloseTerminal(closedTerminal: Terminal): void {
delete terminals[closedTerminal.name];
try {
delete terminals[closedTerminal.name];
} catch (error) {
// ignore it.
}
}

export async function openDialogForFolder(customOptions: OpenDialogOptions): Promise<Uri> {
Expand Down

0 comments on commit 80e8248

Please sign in to comment.