mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #2691 from keepassxreboot/fix/fill_relevant_credential_entry
Fix filling relevant credential entries
This commit is contained in:
commit
10e5b91ece
2 changed files with 3 additions and 3 deletions
|
|
@ -257,11 +257,11 @@ page.retrieveCredentials = async function(tab, args = []) {
|
|||
return credentials;
|
||||
};
|
||||
|
||||
page.getLoginId = async function(tab) {
|
||||
page.getLoginId = async function(tab, returnSingle = true) {
|
||||
const currentTab = page.tabs[tab.id];
|
||||
|
||||
// If there's only one credential available and loginId is not set
|
||||
if (currentTab && !currentTab.loginId && currentTab.credentials.length === 1) {
|
||||
if (currentTab && returnSingle && !currentTab.loginId && currentTab.credentials.length === 1) {
|
||||
return currentTab.credentials[0].uuid;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ kpxc.prepareCredentials = async function() {
|
|||
kpxc.initAutocomplete();
|
||||
|
||||
if (kpxc.settings.autoFillRelevantCredential) {
|
||||
const pageUuid = await sendMessage('page_get_login_id');
|
||||
const pageUuid = await sendMessage('page_get_login_id', false);
|
||||
if (pageUuid) {
|
||||
const relevantCredential = kpxc.credentials.find(c => c.uuid === pageUuid);
|
||||
const combination = kpxc.combinations?.at(-1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue