mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Continue with strict null fixes for Map.get possibly returning undefined
This commit is contained in:
@@ -450,9 +450,9 @@ export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable
|
||||
// Implementation
|
||||
|
||||
private getDataNode(element: TInput | T): IAsyncDataTreeNode<TInput, T> {
|
||||
const node: IAsyncDataTreeNode<TInput, T> = this.nodes.get((element === this.root.element ? null : element) as T);
|
||||
const node: IAsyncDataTreeNode<TInput, T> | undefined = this.nodes.get((element === this.root.element ? null : element) as T);
|
||||
|
||||
if (typeof node === 'undefined') {
|
||||
if (!node) {
|
||||
throw new Error(`Data tree node not found: ${element}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user