mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
catch security errors on ie when reading hostname
This commit is contained in:
@@ -145,12 +145,20 @@ export class Utils {
|
||||
|
||||
static getHostname(uriString: string): string {
|
||||
const url = Utils.getUrl(uriString);
|
||||
try {
|
||||
return url != null ? url.hostname : null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static getHost(uriString: string): string {
|
||||
const url = Utils.getUrl(uriString);
|
||||
try {
|
||||
return url != null ? url.host : null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static getQueryParams(uriString: string): Map<string, string> {
|
||||
|
||||
Reference in New Issue
Block a user