Skip to content

Commit 14301a7

Browse files
authored
TypeError: Cannot read properties of null (reading 'value') (microsoft#159449)
Start throwing when we get a bad tree item. Fixes microsoft#154757
1 parent b177848 commit 14301a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/vs/workbench/api/common/extHostTreeViews.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,7 @@ class ExtHostTreeView<T> extends Disposable {
701701

702702
private validateTreeItem(extensionTreeItem: vscode.TreeItem) {
703703
if (!TreeItem.isTreeItem(extensionTreeItem)) {
704-
// TODO: #154757 we should consider throwing, but let's wait and see if there are tons of reports of this first.
705-
console.log(`Extension ${this.extension.identifier.value} has provided an invalid tree item.`);
704+
throw new Error(`Extension ${this.extension.identifier.value} has provided an invalid tree item.`);
706705
}
707706
}
708707

0 commit comments

Comments
 (0)