Fix attribute filling with identical usernames (#2304)

Fix attribute filling with identical usernames
This commit is contained in:
Sami Vänttinen 2024-08-10 17:01:19 +03:00 committed by GitHub
parent 9b70abff3e
commit 3148fa4011
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -317,11 +317,11 @@ page.updateContextMenu = async function(tab, credentials) {
// Show username inside [] if there are KPH attributes inside multiple credentials
const attributeName = Object.keys(attribute)[0].slice(5);
const finalName = credentials.length > 1
? `[${cred.login}] ${attributeName}`
? `[${cred?.login}] ${attributeName} (${cred.name || credentials.indexOf(cred)})`
: attributeName;
const menuItem = {
action: `fill_attribute_${finalName}`,
action: `fill_attribute_${cred?.uuid}_${attributeName}`,
args: attribute,
parentId: 'fill_attribute',
title: finalName