1
0
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:
Thomas Rittson
2023-04-06 13:30:26 +10:00
committed by GitHub
parent 576d85b268
commit 7899b25ab3
16 changed files with 268 additions and 218 deletions

View File

@@ -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> {