From 39b64b6e87e41a852f88bfde8e374d1e821fcff1 Mon Sep 17 00:00:00 2001 From: brantje Date: Sat, 24 Sep 2016 19:35:42 +0200 Subject: [PATCH] Fix error if callback is not set --- js/app/directives/passwordgen.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/app/directives/passwordgen.js b/js/app/directives/passwordgen.js index 23d75861..6734e2fd 100644 --- a/js/app/directives/passwordgen.js +++ b/js/app/directives/passwordgen.js @@ -170,7 +170,9 @@ angular.module('passmanApp') scope.generatePasswordProgress(); } else { scope.disabled = false; - scope.callback(scope.password) + if(scope.callback) { + scope.callback(scope.password) + } } }, 10); };