Fix exceptions with workspace history
Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
@@ -73,7 +73,7 @@ export default class HistoryTreeDataProvider implements TreeDataProvider<GithubL
|
||||
items.push(...await new WorkspaceFolderHistoryTreeItem(workspaceFolders[0]).getChildren());
|
||||
|
||||
const workspaceHistory = act.historyManager.workspaceHistory[workspaceFolders[0].uri.fsPath];
|
||||
if (workspaceHistory.length > 0) {
|
||||
if (workspaceHistory && workspaceHistory.length > 0) {
|
||||
isRunning = act.historyManager.workspaceHistory[workspaceFolders[0].uri.fsPath].find(workspaceHistory => workspaceHistory.status === HistoryStatus.Running) !== undefined;
|
||||
noHistory = false;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ export default class HistoryTreeDataProvider implements TreeDataProvider<GithubL
|
||||
items.push(new WorkspaceFolderHistoryTreeItem(workspaceFolder));
|
||||
|
||||
const workspaceHistory = act.historyManager.workspaceHistory[workspaceFolder.uri.fsPath];
|
||||
if (workspaceHistory.length > 0) {
|
||||
if (workspaceHistory && workspaceHistory.length > 0) {
|
||||
isRunning = act.historyManager.workspaceHistory[workspaceFolder.uri.fsPath].find(workspaceHistory => workspaceHistory.status === HistoryStatus.Running) !== undefined;
|
||||
noHistory = false;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class SettingsTreeDataProvider implements TreeDataProvider<Github
|
||||
items.push(...await new WorkspaceFolderSettingsTreeItem(workspaceFolders[0]).getChildren());
|
||||
|
||||
const workflows = await act.workflowsManager.getWorkflows(workspaceFolders[0]);
|
||||
if (workflows.length > 0) {
|
||||
if (workflows && workflows.length > 0) {
|
||||
noSettings = false;
|
||||
}
|
||||
} else if (workspaceFolders.length > 1) {
|
||||
@@ -74,7 +74,7 @@ export default class SettingsTreeDataProvider implements TreeDataProvider<Github
|
||||
items.push(new WorkspaceFolderSettingsTreeItem(workspaceFolder));
|
||||
|
||||
const workflows = await act.workflowsManager.getWorkflows(workspaceFolder);
|
||||
if (workflows.length > 0) {
|
||||
if (workflows && workflows.length > 0) {
|
||||
noSettings = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ export default class WorkflowsTreeDataProvider implements TreeDataProvider<Githu
|
||||
items.push(...await new WorkspaceFolderWorkflowsTreeItem(workspaceFolders[0]).getChildren());
|
||||
|
||||
const workflows = await act.workflowsManager.getWorkflows(workspaceFolders[0]);
|
||||
if (workflows.length > 0) {
|
||||
if (workflows && workflows.length > 0) {
|
||||
noWorkflows = false;
|
||||
}
|
||||
} else if (workspaceFolders.length > 1) {
|
||||
@@ -86,7 +86,7 @@ export default class WorkflowsTreeDataProvider implements TreeDataProvider<Githu
|
||||
items.push(new WorkspaceFolderWorkflowsTreeItem(workspaceFolder));
|
||||
|
||||
const workflows = await act.workflowsManager.getWorkflows(workspaceFolder);
|
||||
if (workflows.length > 0) {
|
||||
if (workflows && workflows.length > 0) {
|
||||
noWorkflows = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user