This commit is contained in:
Eugene Pankov
2018-02-12 16:54:04 +01:00
parent 245c65d750
commit fde16b8699

View File

@@ -34,7 +34,7 @@ export class TerminalService {
async openTab (shell?: IShell, cwd?: string): Promise<TerminalTabComponent> { async openTab (shell?: IShell, cwd?: string): Promise<TerminalTabComponent> {
if (!cwd) { if (!cwd) {
if (this.app.activeTab instanceof TerminalTabComponent) { if (this.app.activeTab instanceof TerminalTabComponent && this.app.activeTab.session) {
cwd = await this.app.activeTab.session.getWorkingDirectory() cwd = await this.app.activeTab.session.getWorkingDirectory()
} else { } else {
cwd = this.config.store.terminal.workingDirectory || null cwd = this.config.store.terminal.workingDirectory || null