From 0714bddb3b7a3b839d56d88e15fb34df0eb4f092 Mon Sep 17 00:00:00 2001 From: brantje Date: Sun, 25 Sep 2016 17:19:05 +0200 Subject: [PATCH] Fix active vault bug in settings --- js/app/controllers/settings.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/app/controllers/settings.js b/js/app/controllers/settings.js index be4de5e7..2379f639 100644 --- a/js/app/controllers/settings.js +++ b/js/app/controllers/settings.js @@ -10,7 +10,7 @@ angular.module('passmanApp') .controller('SettingsCtrl', ['$scope', '$rootScope', 'SettingsService', 'VaultService', 'CredentialService', '$location', '$routeParams', '$http', function ($scope, $rootScope, SettingsService, VaultService, CredentialService, $location, $routeParams, $http) { - + $scope.active_vault = VaultService.getActiveVault(); $scope.tabs = [ { title: 'General settings', @@ -53,7 +53,9 @@ angular.module('passmanApp') $scope.$watch(function () { return VaultService.getActiveVault() }, function (vault) { - $scope.active_vault = vault; + if(vault) { + $scope.active_vault = vault; + } }); if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {