Fix Agent tabs not switching (#6271)

This commit is contained in:
Charles Gagnon
2019-07-08 10:25:12 -07:00
committed by GitHub
parent 47e3761159
commit 259f3f5892
2 changed files with 7 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ interface IInternalPanelTab {
disposables: IDisposable[];
label: HTMLElement;
body?: HTMLElement;
destoryTabBody?: boolean;
destroyTabBody?: boolean;
}
const defaultOptions: IPanelOptions = {
@@ -115,10 +115,10 @@ export class TabbedPanel extends Disposable {
return this._tabMap.has(tab.identifier);
}
public pushTab(tab: IPanelTab, index?: number, destoryTabBody?: boolean): PanelTabIdentifier {
public pushTab(tab: IPanelTab, index?: number, destroyTabBody?: boolean): PanelTabIdentifier {
let internalTab = { tab } as IInternalPanelTab;
internalTab.disposables = [];
internalTab.destoryTabBody = destoryTabBody;
internalTab.destroyTabBody = destroyTabBody;
this._tabMap.set(tab.identifier, internalTab);
this._createTab(internalTab, index);
if (!this._shownTabId) {
@@ -203,7 +203,7 @@ export class TabbedPanel extends Disposable {
this.tabHistory.push(id);
const tab = this._tabMap.get(this._shownTabId)!; // @anthonydresser we know this can't be undefined since we check further up if the map contains the id
if (tab.destoryTabBody && tab.body) {
if (tab.destroyTabBody && tab.body) {
tab.body.remove();
tab.body = undefined;
}