empty strength bar for empty password field

This commit is contained in:
Ulf Gebhardt 2019-05-07 20:41:22 +02:00
parent f6b25fd8f2
commit 48920f8b9d
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3

View File

@ -43,7 +43,7 @@ export default {
* @return {Number} Password Strength Score
*/
passwordStrength() {
const score = !isEmpty(this.pass) ? zxcvbn(this.pass).score : 0
const score = !isEmpty(this.pass) ? zxcvbn(this.pass).score : 'empty'
if (score !== this.lastScore) {
this.lastScore = score
this.$emit('change', {