diff options
author | brantje <brantje@gmail.com> | 2016-09-27 23:48:11 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2016-09-27 23:48:11 +0300 |
commit | 5398d2ba741d2d90ee561f905dff7938ee769902 (patch) | |
tree | 43ac9ac9b61466bdb1efcdb7473051e67a7f7102 /js/app/directives | |
parent | e0cbf27f3d565ac87c6ce15ad02cb5c471bf5540 (diff) |
Generate password with passwordgen if scope.password is empty
Diffstat (limited to 'js/app/directives')
-rw-r--r-- | js/app/directives/passwordgen.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/app/directives/passwordgen.js b/js/app/directives/passwordgen.js index 6734e2fd..32cfdc16 100644 --- a/js/app/directives/passwordgen.js +++ b/js/app/directives/passwordgen.js @@ -137,10 +137,9 @@ angular.module('passmanApp') scope.model = scope.password; scope.password_repeat = scope.model; - if(scope.password !== undefined && scope.password !== null && scope.password !== "") { - scope.passwordNotNull = true; - } else { - scope.passwordNotNull = false; + if(!scope.password) { + console.log('Generating new pw'); + scope.generatePasswordStart(); } }); // |