diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts index 9c4a658c95..3726225d93 100644 --- a/apps/browser/src/autofill/background/overlay.background.ts +++ b/apps/browser/src/autofill/background/overlay.background.ts @@ -424,9 +424,14 @@ export class OverlayBackground implements OverlayBackgroundInterface { CipherType.Identity, ]) ).sort((a, b) => this.cipherService.sortCiphersByLastUsedThenName(a, b)); + if (!this.cardAndIdentityCiphers) { + return cipherViews; + } + for (let cipherIndex = 0; cipherIndex < cipherViews.length; cipherIndex++) { const cipherView = cipherViews[cipherIndex]; if ( + this.cardAndIdentityCiphers && !this.cardAndIdentityCiphers.has(cipherView) && [CipherType.Card, CipherType.Identity].includes(cipherView.type) ) {