mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
Merge pull request #123 from bitwarden/malformed-url-fix
Prevent malformed URLs from blocking the loading of the current tab
This commit is contained in:
commit
7561f6dcb5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user