From dff91dc67da92b1ed86b95b395f21ad0ee257091 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 10 Dec 2018 09:41:21 -0500 Subject: [PATCH] no folder fixes for groupings display --- src/App/Pages/Vault/VaultListCiphersPage.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/App/Pages/Vault/VaultListCiphersPage.cs b/src/App/Pages/Vault/VaultListCiphersPage.cs index 86f8163c2..9bafd35c0 100644 --- a/src/App/Pages/Vault/VaultListCiphersPage.cs +++ b/src/App/Pages/Vault/VaultListCiphersPage.cs @@ -328,14 +328,16 @@ namespace Bit.App.Pages if(_folder || !string.IsNullOrWhiteSpace(_folderId)) { ciphers = await _cipherService.GetAllByFolderAsync(_folderId); - - var folders = await _folderService.GetAllAsync(); - var fGroupings = folders.Select(f => new Grouping(f, null)).OrderBy(g => g.Name).ToList(); - var fTreeNodes = Helpers.GetAllNested(fGroupings); - var fTreeNode = Helpers.GetTreeNodeObject(fTreeNodes, _folderId); - if(fTreeNode.Children?.Any() ?? false) + if(!string.IsNullOrWhiteSpace(_folderId)) { - Groupings = fTreeNode.Children.Select(n => new GroupingOrCipher(n)).ToArray(); + var folders = await _folderService.GetAllAsync(); + var fGroupings = folders.Select(f => new Grouping(f, null)).OrderBy(g => g.Name).ToList(); + var fTreeNodes = Helpers.GetAllNested(fGroupings); + var fTreeNode = Helpers.GetTreeNodeObject(fTreeNodes, _folderId); + if(fTreeNode.Children?.Any() ?? false) + { + Groupings = fTreeNode.Children.Select(n => new GroupingOrCipher(n)).ToArray(); + } } } else if(!string.IsNullOrWhiteSpace(_collectionId))