mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Moved error checking to utils, where parse is
This commit is contained in:
@@ -204,9 +204,14 @@ export class Utils {
|
|||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
const domain = tldjs != null && tldjs.getDomain != null ? tldjs.getDomain(uriString) : null;
|
try {
|
||||||
if (domain != null) {
|
const domain = tldjs != null && tldjs.getDomain != null ? tldjs.getDomain(uriString) : null;
|
||||||
return domain;
|
|
||||||
|
if (domain != null) {
|
||||||
|
return domain;
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -333,11 +333,9 @@ export class CipherService implements CipherServiceAbstraction {
|
|||||||
this.settingsService.getEquivalentDomains().then((eqDomains: any[][]) => {
|
this.settingsService.getEquivalentDomains().then((eqDomains: any[][]) => {
|
||||||
let matches: any[] = [];
|
let matches: any[] = [];
|
||||||
eqDomains.forEach((eqDomain) => {
|
eqDomains.forEach((eqDomain) => {
|
||||||
try {
|
if (eqDomain.length && eqDomain.indexOf(domain) >= 0) {
|
||||||
if (eqDomain.length && eqDomain.indexOf(domain) >= 0) {
|
matches = matches.concat(eqDomain);
|
||||||
matches = matches.concat(eqDomain);
|
}
|
||||||
}
|
|
||||||
} catch {}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!matches.length) {
|
if (!matches.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user