mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +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.
|
||||
* @returns true if the cipher passes *any* of the filters
|
||||
* Checks if the cipher passes the state filter options.
|
||||
* @returns true if the cipher matches the requested state
|
||||
*/
|
||||
private matchesStateOptions(c: CipherView, options: Options): boolean {
|
||||
const passesTrashFilter = options.trash && c.isDeleted;
|
||||
const passesArchivedFilter = options.archived && c.isArchived;
|
||||
const passesTrashFilter = options.trash === c.isDeleted;
|
||||
const passesArchivedFilter = options.archived === c.isArchived;
|
||||
|
||||
return passesTrashFilter || passesArchivedFilter;
|
||||
return passesTrashFilter && passesArchivedFilter;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user