mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Fix logic for list filtering for trash and archived items (#16702)
This commit is contained in:
@@ -304,14 +304,14 @@ export class ListCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the cipher passes either the trash or the archive options.
|
* Checks if the cipher passes the state filter options.
|
||||||
* @returns true if the cipher passes *any* of the filters
|
* @returns true if the cipher matches the requested state
|
||||||
*/
|
*/
|
||||||
private matchesStateOptions(c: CipherView, options: Options): boolean {
|
private matchesStateOptions(c: CipherView, options: Options): boolean {
|
||||||
const passesTrashFilter = options.trash && c.isDeleted;
|
const passesTrashFilter = options.trash === c.isDeleted;
|
||||||
const passesArchivedFilter = options.archived && c.isArchived;
|
const passesArchivedFilter = options.archived === c.isArchived;
|
||||||
|
|
||||||
return passesTrashFilter || passesArchivedFilter;
|
return passesTrashFilter && passesArchivedFilter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user