Updating the cache element and not an unlinked reference to it. (#19057)

This commit is contained in:
Aasim Khan
2022-04-13 14:33:35 -07:00
committed by GitHub
parent e073c012af
commit 7dfa347250
2 changed files with 2 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ export class ExecutionPlanFileView {
}
public onHide(parentContainer: HTMLElement): void {
if (parentContainer === this._parent) {
if (parentContainer === this._parent && parentContainer.contains(this._container)) {
this._parent.removeChild(this._container);
}
}

View File

@@ -84,6 +84,7 @@ export class ExecutionPlanTabView implements IPanelView {
currentView.onHide(this._container);
this._input.graphs = [];
currentView = this._instantiationService.createInstance(ExecutionPlanFileView);
this._viewCache.executionPlanFileViewMap.set(this._input.executionPlanFileViewUUID, currentView);
currentView.render(this._container);
}
}