mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge pull request #11416 from Microsoft/11377_fix_terminal_exception
Fix terminal exception when create new is called on uninitialized panel
This commit is contained in:
@@ -196,6 +196,12 @@ export class TerminalService implements ITerminalService {
|
||||
}
|
||||
|
||||
return this.focus().then((terminalPanel) => {
|
||||
// If the terminal panel has not been initialized yet skip this, the terminal will be
|
||||
// created via a call from TerminalPanel.setVisible
|
||||
if (terminalPanel === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only create a new process if none have been created since toggling the terminal
|
||||
// panel. This happens when createNew is called when the panel is either empty or no yet
|
||||
// created.
|
||||
|
||||
Reference in New Issue
Block a user