diff --git a/keepassxc-browser/content/icons.js b/keepassxc-browser/content/icons.js index dda3a2a..f8e03c1 100644 --- a/keepassxc-browser/content/icons.js +++ b/keepassxc-browser/content/icons.js @@ -34,7 +34,7 @@ kpxcIcons.addIcon = async function(field, iconType) { } }; -// Adds all necessary icons to a saved form +// Adds all icons from a form struct kpxcIcons.addIconsFromForm = async function(form) { const addUsernameIcons = async function(c) { if (kpxc.settings.showLoginFormIcon && await kpxc.passwordFilledWithExceptions(c) === false) { @@ -93,13 +93,12 @@ kpxcIcons.initIcons = async function(combinations = []) { await kpxcIcons.addIconsFromForm(form); } - // Check for other combinations that are not in any form + // Check for other combinations that are not in any form, + // or there's a form that wasn't present in savedForms (and it's not null) for (const c of combinations) { - if (c.form) { - continue; + if (!c.form || (c.form && !kpxcForm.savedForms.some(sf => sf.form === c.form))) { + await kpxcIcons.addIconsFromForm(c); } - - await kpxcIcons.addIconsFromForm(c); } };