Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorbrantje <brantje@gmail.com>2016-10-12 22:56:35 +0300
committerbrantje <brantje@gmail.com>2016-10-12 22:56:35 +0300
commit5e1b457c14486ee22c96f541d674874b3a09aa46 (patch)
tree2980494e7e7f5312eb1a3b310577285b68e7b617 /js
parent401da2bd55b82d387c3fab3697702d7317491398 (diff)
Check if description is set before replacing newlines
Diffstat (limited to 'js')
-rw-r--r--js/app/controllers/credential.js4
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);
};