diff --git a/src/app/vault/vaultController.js b/src/app/vault/vaultController.js index 0ca45ec9cd..b5df746cdd 100644 --- a/src/app/vault/vaultController.js +++ b/src/app/vault/vaultController.js @@ -162,6 +162,10 @@ }; $scope.collapseAll = function () { + if (!$localStorage.collapsedFolders) { + $localStorage.collapsedFolders = {}; + } + $localStorage.collapsedFolders.none = true; $localStorage.collapsedFolders.favorite = true; @@ -178,6 +182,10 @@ }; $scope.expandAll = function () { + if (!$localStorage.collapsedFolders) { + $localStorage.collapsedFolders = {}; + } + delete $localStorage.collapsedFolders.none; delete $localStorage.collapsedFolders.favorite;