Skip to content

Commit 07c1615

Browse files
committed
Ensures that reveal waits for children
1 parent 0c22898 commit 07c1615

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

src/views/viewBase.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -861,28 +861,15 @@ export abstract class ViewBase<
861861
const scope = getLogScope();
862862

863863
try {
864+
while (this._loadingPromise != null) {
865+
await this._loadingPromise;
866+
}
867+
864868
await this.tree?.reveal(node, options);
865869
} catch (ex) {
866870
if (!node.id || root == null) {
867871
Logger.error(ex, scope);
868872
debugger;
869-
870-
return;
871-
}
872-
873-
const n = await this.findNodeCoreBFS(n => n.id === node.id, root, false, undefined, 0, undefined);
874-
if (n == null) {
875-
Logger.error(ex, scope);
876-
debugger;
877-
878-
return;
879-
}
880-
881-
try {
882-
await this.tree?.reveal(n, options);
883-
} catch (ex) {
884-
Logger.error(ex, scope);
885-
debugger;
886873
}
887874
}
888875
}

0 commit comments

Comments
 (0)