Fix filling relevant credential entries

This commit is contained in:
varjolintu 2025-09-15 20:24:01 +03:00
parent bbff228b40
commit a610ff70bd
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}

View file

@ -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);