mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Remove duplicate entries
This commit is contained in:
parent
b01ab1e835
commit
ec1e59ba98
1 changed files with 15 additions and 1 deletions
|
|
@ -255,7 +255,7 @@ keepass.retrieveCredentials = async function(tab, args = []) {
|
|||
keepass.setcurrentKeePassXCVersion(parsed.version);
|
||||
|
||||
if (keepass.verifyResponse(parsed, incrementedNonce)) {
|
||||
entries = parsed.entries;
|
||||
entries = removeDuplicateEntries(parsed.entries);
|
||||
keepass.updateLastUsed(keepass.databaseHash);
|
||||
if (entries.length === 0) {
|
||||
// Questionmark-icon is not triggered, so we have to trigger for the normal symbol
|
||||
|
|
@ -1214,3 +1214,17 @@ keepass.buildRequest = function(action, encrypted, nonce, clientID, triggerUnloc
|
|||
keepass.getIsKeePassXCAvailable = async function() {
|
||||
return keepass.isKeePassXCAvailable;
|
||||
};
|
||||
|
||||
const removeDuplicateEntries = function(arr) {
|
||||
const newArray = [];
|
||||
|
||||
for (const a of arr) {
|
||||
if (newArray.some(i => i.uuid === a.uuid)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
newArray.push(a);
|
||||
}
|
||||
|
||||
return newArray;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue