Skip to content

Commit a6d8816

Browse files
committed
Avoids creating needless deferred
1 parent 6aaffa0 commit a6d8816

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/views/scmGroupedView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export class ScmGroupedView implements Disposable {
8080
if (!destroyTree) {
8181
// Force a "refresh" of the tree to blank it out
8282
this._cleared?.cancel();
83-
this._cleared = defer<void>();
8483
if (this._tree?.visible) {
84+
this._cleared = defer<void>();
8585
this._onDidChangeTreeData?.fire(undefined);
8686
await this._cleared.promise.catch(() => {}).finally(() => (this._cleared = undefined));
8787
}

0 commit comments

Comments
 (0)