提交 a7ef42a9 编写于 作者: M Matt Bierner

Fix strict null errors related to getActivePanel

上级 8d077769
......@@ -68,7 +68,7 @@ abstract class BaseNavigationAction extends Action {
return false;
}
const activePanelId = this.panelService.getActivePanel().getId();
const activePanelId = this.panelService.getActivePanel()!.getId();
return this.panelService.openPanel(activePanelId, true);
}
......
......@@ -95,7 +95,7 @@ export abstract class TogglePanelAction extends Action {
private isPanelActive(): boolean {
const activePanel = this.panelService.getActivePanel();
return activePanel && activePanel.getId() === this.panelId;
return !!activePanel && activePanel.getId() === this.panelId;
}
private isPanelFocused(): boolean {
......
......@@ -924,7 +924,7 @@ export class TerminalInstance implements ITerminalInstance {
private _refreshSelectionContextKey() {
const activePanel = this._panelService.getActivePanel();
const isActive = activePanel && activePanel.getId() === TERMINAL_PANEL_ID;
const isActive = !!activePanel && activePanel.getId() === TERMINAL_PANEL_ID;
this._terminalHasTextContextKey.set(isActive && this.hasSelection());
}
......
......@@ -378,6 +378,7 @@ class TimerService implements ITimerService {
}
const activeViewlet = this._viewletService.getActiveViewlet();
const activePanel = this._panelService.getActivePanel();
return {
version: 2,
ellapsed: perf.getDuration(startMark, 'didStartWorkbench'),
......@@ -389,7 +390,7 @@ class TimerService implements ITimerService {
windowCount: await this._windowsService.getWindowCount(),
viewletId: activeViewlet ? activeViewlet.getId() : undefined,
editorIds: this._editorService.visibleEditors.map(input => input.getTypeId()),
panelId: this._panelService.getActivePanel() ? this._panelService.getActivePanel().getId() : undefined,
panelId: activePanel ? activePanel.getId() : undefined,
// timers
timers: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册