Skip to content

Commit

Permalink
fix(TableViewProvider): dispose pre-existing table
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Jul 30, 2024
1 parent 4b0532a commit aed2736
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/zowe-explorer-api/src/vscode/ui/TableViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Table } from "./TableView";

export class TableViewProvider implements WebviewViewProvider {
private view: WebviewView;
private tableView: Table.View;
private tableView: Table.Instance = null;

private static instance: TableViewProvider;

Expand All @@ -28,7 +28,10 @@ export class TableViewProvider implements WebviewViewProvider {
return this.instance;
}

public setTableView(tableView: Table.View | null): void {
public setTableView(tableView: Table.Instance | null): void {
if (this.tableView != null) {
this.tableView.dispose();
}
this.tableView = tableView;

if (tableView == null) {
Expand Down

0 comments on commit aed2736

Please sign in to comment.