1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

Moved error checking to utils, where parse is

This commit is contained in:
Matt Smith
2020-07-10 10:01:15 -05:00
parent ebaa69a15b
commit 57649f31c4
2 changed files with 11 additions and 8 deletions

View File

@@ -204,9 +204,14 @@ export class Utils {
} catch (e) { }
}
const domain = tldjs != null && tldjs.getDomain != null ? tldjs.getDomain(uriString) : null;
if (domain != null) {
return domain;
try {
const domain = tldjs != null && tldjs.getDomain != null ? tldjs.getDomain(uriString) : null;
if (domain != null) {
return domain;
}
} catch {
return null;
}
return null;