mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
Only return ciphers when they exist. (#15716)
conditionals within the template are checking for an empty array rather than an empty ciphers property.
This commit is contained in:
@@ -146,14 +146,16 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
|
||||
ciphers: PopupCipherViewLike[];
|
||||
}[]
|
||||
>(() => {
|
||||
const ciphers = this.ciphers();
|
||||
|
||||
// Not grouping by type, return a single group with all ciphers
|
||||
if (!this.groupByType()) {
|
||||
return [{ ciphers: this.ciphers() }];
|
||||
if (!this.groupByType() && ciphers.length > 0) {
|
||||
return [{ ciphers }];
|
||||
}
|
||||
|
||||
const groups: Record<string, PopupCipherViewLike[]> = {};
|
||||
|
||||
this.ciphers().forEach((cipher) => {
|
||||
ciphers.forEach((cipher) => {
|
||||
let groupKey = "all";
|
||||
switch (CipherViewLikeUtils.getType(cipher)) {
|
||||
case CipherType.Card:
|
||||
|
||||
Reference in New Issue
Block a user