Merge pull request #1497 from keepassxreboot/fix/check_for_undefined

Fix check for undefined combination variable
This commit is contained in:
Sami Vänttinen 2021-12-09 06:54:56 +02:00 committed by GitHub
commit 5d6645586e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1540,6 +1540,10 @@ kpxc.rememberCredentialsFromContextMenu = async function() {
const type = el.getAttribute('type');
const combination = await kpxcFields.getCombination(el, (type === 'password' ? type : 'username'));
if (!combination) {
return;
}
const usernameValue = combination.username ? combination.username.value : '';
const passwordValue = combination.password ? combination.password.value : '';