Browse Source

fix all checkbox unchecked

It is also possible to uncheck all checkboxes, in which case the last password remains.
pull/342/head
Guillaume Vincent 8 years ago
parent
commit
371e39e154
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      extension/popup.js

+ 4
- 2
extension/popup.js View File

@@ -115,11 +115,13 @@ document.getElementById('passwordCounter').addEventListener('input', generatePas

function generatePassword() {
const data = getFormData();
if (!data.login || !data.masterPassword || !data.site) {
const generatedPasswordField = document.getElementById('generatedPasswordField');
if (!data.login || !data.masterPassword || !data.site || !data.password.settings.length) {
generatedPasswordField.value = '';
return;
}
return lesspass.generatePassword(data.login, data.masterPassword, data.site, data).then(password => {
document.getElementById('generatedPasswordField').value = password;
generatedPasswordField.value = password;
return password;
});
}


Loading…
Cancel
Save