mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-27 03:11:35 +01:00
break from switch
This commit is contained in:
parent
ad4c81ed84
commit
f205a9cc9f
@ -219,24 +219,29 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
if (domain != null && u.domain != null && matchingDomains.indexOf(u.domain) > -1) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case UriMatchType.Host:
|
||||
const urlHost = this.utilsService.getHost(url);
|
||||
if (urlHost != null && urlHost === this.utilsService.getHost(u.uri)) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case UriMatchType.Exact:
|
||||
if (url === u.uri) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case UriMatchType.StartsWith:
|
||||
if (url.startsWith(u.uri)) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case UriMatchType.RegularExpression:
|
||||
const regex = new RegExp(u.uri, 'i');
|
||||
if (regex.test(url)) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case UriMatchType.Never:
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user