mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[PM-1426] Refactor uri matching (#5003)
* Move URI matching logic into uriView * Fix url parsing: always assign default protocol, otherwise no protocol with port is parsed incorrectly * Codescene: refactor domain matching logic
This commit is contained in:
@@ -40,10 +40,10 @@ export class SettingsService implements SettingsServiceAbstraction {
|
||||
await this.stateService.setSettings(settings);
|
||||
}
|
||||
|
||||
getEquivalentDomains(url: string): string[] {
|
||||
getEquivalentDomains(url: string): Set<string> {
|
||||
const domain = Utils.getDomain(url);
|
||||
if (domain == null) {
|
||||
return null;
|
||||
return new Set();
|
||||
}
|
||||
|
||||
const settings = this._settings.getValue();
|
||||
@@ -58,7 +58,7 @@ export class SettingsService implements SettingsServiceAbstraction {
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
return new Set(result);
|
||||
}
|
||||
|
||||
async clear(userId?: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user