From 2425e594f0c2b225b0f76c79af6c8c54ace3cd4b Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 13 Dec 2018 09:12:00 -0800 Subject: [PATCH] Fix strict null checks --- src/vs/workbench/parts/terminal/common/terminalService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/common/terminalService.ts b/src/vs/workbench/parts/terminal/common/terminalService.ts index 5c6a4576e8d..1ea70cdf23f 100644 --- a/src/vs/workbench/parts/terminal/common/terminalService.ts +++ b/src/vs/workbench/parts/terminal/common/terminalService.ts @@ -68,7 +68,10 @@ export abstract class TerminalService implements ITerminalService { this._terminalFocusContextKey = KEYBINDING_CONTEXT_TERMINAL_FOCUS.bindTo(this._contextKeyService); this._findWidgetVisible = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); this.onTabDisposed(tab => this._removeTab(tab)); - this.onActiveTabChanged(() => this._onActiveInstanceChanged.fire(this.getActiveInstance())); + this.onActiveTabChanged(() => { + const instance = this.getActiveInstance(); + this._onActiveInstanceChanged.fire(instance ? instance : undefined); + }); this._handleContextKeys(); } -- GitLab