Previous fix results in empty sshfs-configs view when no workspace folder is available

pull/13/head
Kelvin Schoofs 7 years ago
parent af690d5d22
commit 4753d50e20

@ -358,8 +358,7 @@ export class Manager implements vscode.FileSystemProvider, vscode.TreeDataProvid
public getChildren(element?: string | undefined): vscode.ProviderResult<string[]> {
const configs = this.loadConfigs().map(c => c.name);
this.fileSystems.forEach(fs => configs.indexOf(fs.authority) === -1 && configs.push(fs.authority));
const folders = vscode.workspace.workspaceFolders;
if (!folders) return [];
const folders = vscode.workspace.workspaceFolders || [];
folders.filter(f => f.uri.scheme === 'ssh').forEach(f => configs.indexOf(f.uri.authority) === -1 && configs.push(f.uri.authority));
return configs;
}

Loading…
Cancel
Save