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
diff options
context:
space:
mode:
Diffstat (limited to 'js/app/directives/iconpicker.js')
-rw-r--r--js/app/directives/iconpicker.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/app/directives/iconpicker.js b/js/app/directives/iconpicker.js
index 2cc60594..210dfacb 100644
--- a/js/app/directives/iconpicker.js
+++ b/js/app/directives/iconpicker.js
@@ -129,7 +129,9 @@
};
scope.useIcon = function() {
-
+ if(!scope.credential.icon){
+ scope.credential.icon = {};
+ }
if(scope.customIcon){
var data = scope.customIcon.data;
scope.credential.icon.type = data.substring(data.lastIndexOf(":")+1,data.lastIndexOf(";"));
@@ -138,9 +140,6 @@
$http.get(scope.selectedIcon.url).then(function(result) {
var base64Data = window.btoa(result.data);
var mimeType = 'svg+xml';
- if(!scope.credential.icon){
- scope.credential.icon = {};
- }
scope.credential.icon.type = mimeType;
scope.credential.icon.content = base64Data;
});