Browse Source

Removes default impl to allow for existence tests

main
Eric Amodio 2 years ago
parent
commit
d2473275d3
2 changed files with 2 additions and 4 deletions
  1. +1
    -3
      src/views/nodes/viewNode.ts
  2. +1
    -1
      src/views/viewBase.ts

+ 1
- 3
src/views/nodes/viewNode.ts View File

@ -121,9 +121,7 @@ export abstract class ViewNode {
abstract getTreeItem(): TreeItem | Promise<TreeItem>;
resolveTreeItem(item: TreeItem): TreeItem | Promise<TreeItem> {
return item;
}
resolveTreeItem?(item: TreeItem): TreeItem | Promise<TreeItem>;
getCommand(): Command | undefined {
return undefined;

+ 1
- 1
src/views/viewBase.ts View File

@ -277,7 +277,7 @@ export abstract class ViewBase<
}
resolveTreeItem(item: TreeItem, node: ViewNode): TreeItem | Promise<TreeItem> {
return node.resolveTreeItem(item);
return node.resolveTreeItem?.(item) ?? item;
}
protected onElementCollapsed(e: TreeViewExpansionEvent<ViewNode>) {

Loading…
Cancel
Save