Skip to content

Commit

Permalink
Allow tree data providers to return null items (#13018)
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Oct 26, 2023
1 parent e8e4700 commit 8cb8268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugin-ext/src/plugin/tree/tree-views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { PluginIconPath } from '../plugin-icon-path';
import { URI } from '@theia/core/shared/vscode-uri';
import { UriComponents } from '@theia/core/lib/common/uri';
import { isObject } from '@theia/core';
import { coalesce } from '../../common/arrays';

export class TreeViewsExtImpl implements TreeViewsExt {
private proxy: TreeViewsMain;
Expand Down Expand Up @@ -407,7 +408,7 @@ class TreeViewExtImpl<T> implements Disposable {
// ask data provider for children for cached element
const result = await this.options.treeDataProvider.getChildren(parent);
if (result) {
const treeItemPromises = result.map(async value => {
const treeItemPromises = coalesce(result).map(async value => {

// Ask data provider for a tree item for the value
// Data provider must return theia.TreeItem
Expand Down

0 comments on commit 8cb8268

Please sign in to comment.