1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

break from switch

This commit is contained in:
Kyle Spearrin 2018-03-02 12:36:53 -05:00
parent ad4c81ed84
commit f205a9cc9f

View File

@ -219,24 +219,29 @@ export class CipherService implements CipherServiceAbstraction {
if (domain != null && u.domain != null && matchingDomains.indexOf(u.domain) > -1) { if (domain != null && u.domain != null && matchingDomains.indexOf(u.domain) > -1) {
return true; return true;
} }
break;
case UriMatchType.Host: case UriMatchType.Host:
const urlHost = this.utilsService.getHost(url); const urlHost = this.utilsService.getHost(url);
if (urlHost != null && urlHost === this.utilsService.getHost(u.uri)) { if (urlHost != null && urlHost === this.utilsService.getHost(u.uri)) {
return true; return true;
} }
break;
case UriMatchType.Exact: case UriMatchType.Exact:
if (url === u.uri) { if (url === u.uri) {
return true; return true;
} }
break;
case UriMatchType.StartsWith: case UriMatchType.StartsWith:
if (url.startsWith(u.uri)) { if (url.startsWith(u.uri)) {
return true; return true;
} }
break;
case UriMatchType.RegularExpression: case UriMatchType.RegularExpression:
const regex = new RegExp(u.uri, 'i'); const regex = new RegExp(u.uri, 'i');
if (regex.test(url)) { if (regex.test(url)) {
return true; return true;
} }
break;
case UriMatchType.Never: case UriMatchType.Never:
default: default:
break; break;