async data source can be sync

This commit is contained in:
Joao Moreno
2018-12-17 09:59:55 +01:00
parent 75d5bc4085
commit 3ccc7a9a1f
2 changed files with 2 additions and 2 deletions

View File

@@ -468,7 +468,7 @@ export class AsyncDataTree<T extends NonNullable<any>, TFilterData = void> imple
this._onDidChangeNodeState.fire(node);
}, _ => null);
return this.dataSource.getChildren(node.element)
return Promise.resolve(this.dataSource.getChildren(node.element))
.then(children => {
slowTimeout.cancel();
node.state = AsyncDataTreeNodeState.Loaded;