From d2fc272af2b578d5b73472de5af98afacb528a11 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Wed, 8 Dec 2021 21:34:28 +0200 Subject: [PATCH] Fix check for undefined combination variable --- keepassxc-browser/content/keepassxc-browser.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keepassxc-browser/content/keepassxc-browser.js b/keepassxc-browser/content/keepassxc-browser.js index 65bf49a..34f077c 100755 --- a/keepassxc-browser/content/keepassxc-browser.js +++ b/keepassxc-browser/content/keepassxc-browser.js @@ -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 : '';