diff options
author | brantje <brantje@gmail.com> | 2016-10-12 22:56:35 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2016-10-12 22:56:35 +0300 |
commit | 5e1b457c14486ee22c96f541d674874b3a09aa46 (patch) | |
tree | 2980494e7e7f5312eb1a3b310577285b68e7b617 /js | |
parent | 401da2bd55b82d387c3fab3697702d7317491398 (diff) |
Check if description is set before replacing newlines
Diffstat (limited to 'js')
-rw-r--r-- | js/app/controllers/credential.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js index 1e3629f7..579f3e91 100644 --- a/js/app/controllers/credential.js +++ b/js/app/controllers/credential.js @@ -344,7 +344,9 @@ $scope.selectedCredential = false; $scope.selectCredential = function (credential) { - credential.description_html = $sce.trustAsHtml(angular.copy(credential.description).replace("\n", '<br />')); + if(credential.description) { + credential.description_html = $sce.trustAsHtml(angular.copy(credential.description).replace("\n", '<br />')); + } $scope.selectedCredential = angular.copy(credential); $rootScope.$emit('app_menu', true); }; |