check undefined (#10596)

This commit is contained in:
Alan Ren
2020-05-27 16:51:52 -07:00
committed by GitHub
parent e7f65f45f2
commit 032b625ed1
2 changed files with 7 additions and 5 deletions

View File

@@ -149,10 +149,12 @@ export class DashboardNavSection extends DashboardTab implements OnDestroy, OnCh
}
public layout() {
const activeTabId = this._panel.getActiveTab;
const localtab = this._tabs.find(i => i.id === activeTabId);
this._cd.detectChanges();
localtab.layout();
if (this._tabs) {
const activeTabId = this._panel.getActiveTab;
const localtab = this._tabs.find(i => i.id === activeTabId);
this._cd.detectChanges();
localtab.layout();
}
}
public refresh(): void {