mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
code cleanup (#6238)
This commit is contained in:
parent
8c06508435
commit
014b32b488
@ -398,14 +398,21 @@ export class CipherService implements CipherServiceAbstraction {
|
|||||||
defaultMatch ??= await this.stateService.getDefaultUriMatch();
|
defaultMatch ??= await this.stateService.getDefaultUriMatch();
|
||||||
|
|
||||||
return ciphers.filter((cipher) => {
|
return ciphers.filter((cipher) => {
|
||||||
if (cipher.deletedDate != null) {
|
const cipherIsLogin = cipher.type === CipherType.Login && cipher.login !== null;
|
||||||
|
|
||||||
|
if (cipher.deletedDate !== null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (includeOtherTypes != null && includeOtherTypes.indexOf(cipher.type) > -1) {
|
|
||||||
|
if (
|
||||||
|
Array.isArray(includeOtherTypes) &&
|
||||||
|
includeOtherTypes.includes(cipher.type) &&
|
||||||
|
!cipherIsLogin
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cipher.type === CipherType.Login && cipher.login !== null) {
|
if (cipherIsLogin) {
|
||||||
return cipher.login.matchesUri(url, equivalentDomains, defaultMatch);
|
return cipher.login.matchesUri(url, equivalentDomains, defaultMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user