From 7a895dda1aa4430cf82bdf4549f170648838bea4 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sun, 1 Mar 2020 16:16:03 +0100 Subject: [PATCH] fixes --- .../src/components/shellSettingsTab.component.ts | 4 ++-- terminus-terminal/src/features/debug.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/terminus-terminal/src/components/shellSettingsTab.component.ts b/terminus-terminal/src/components/shellSettingsTab.component.ts index e7eb04a4..8009640e 100644 --- a/terminus-terminal/src/components/shellSettingsTab.component.ts +++ b/terminus-terminal/src/components/shellSettingsTab.component.ts @@ -37,7 +37,7 @@ export class ShellSettingsTabComponent { this.isConPTYStable = isWindowsBuild(WIN_BUILD_CONPTY_STABLE) } - async ngOnInit (): void { + async ngOnInit (): Promise { this.shells = await this.terminalService.shells$.toPromise() } @@ -45,7 +45,7 @@ export class ShellSettingsTabComponent { this.configSubscription.unsubscribe() } - async reload (): void { + async reload (): Promise { this.profiles = await this.terminalService.getProfiles(true) } diff --git a/terminus-terminal/src/features/debug.ts b/terminus-terminal/src/features/debug.ts index 967cde08..03429b20 100644 --- a/terminus-terminal/src/features/debug.ts +++ b/terminus-terminal/src/features/debug.ts @@ -98,7 +98,9 @@ export class DebugDecorator extends TerminalDecorator { private async doLoadState (terminal: TerminalTabComponent) { const data = await this.loadFile() - terminal.frontend.restoreState(data) + if (data) { + terminal.frontend.restoreState(data) + } } private async doPasteState (terminal: TerminalTabComponent) { -- GitLab