We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10a2dd6 commit 62e5143Copy full SHA for 62e5143
src/workspacesProvider.ts
@@ -45,16 +45,22 @@ export class WorkspaceProvider implements vscode.TreeDataProvider<vscode.TreeIte
45
// needs to be cleared.
46
this.cancelPendingRefresh()
47
48
+ let hadError = false
49
try {
50
this.workspaces = await this.fetch()
- this.fetching = false
51
- this.maybeScheduleRefresh()
52
} catch (error) {
+ hadError = true
53
this.workspaces = []
54
55
}
56
+ this.fetching = false
57
+
58
this.refresh()
59
60
+ // As long as there was no error we can schedule the next refresh.
61
+ if (hadError) {
62
+ this.maybeScheduleRefresh()
63
+ }
64
65
66
/**
0 commit comments