Reverted prior change. Changed call to getHost
This commit is contained in:
parent
49b796ebd6
commit
8223011248
|
@ -157,13 +157,7 @@ export class Utils {
|
||||||
static getHostname(uriString: string): string {
|
static getHostname(uriString: string): string {
|
||||||
const url = Utils.getUrl(uriString);
|
const url = Utils.getUrl(uriString);
|
||||||
try {
|
try {
|
||||||
let hostname = url != null && url.hostname !== '' ? url.hostname : null;
|
return url != null && url.hostname !== '' ? url.hostname : null;
|
||||||
|
|
||||||
if (hostname != null && url.port !== '') {
|
|
||||||
hostname += ":" + url.port;
|
|
||||||
}
|
|
||||||
|
|
||||||
return hostname;
|
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ export class LoginUriView implements View {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (this._hostname == null && this.uri != null) {
|
if (this._hostname == null && this.uri != null) {
|
||||||
this._hostname = Utils.getHostname(this.uri);
|
this._hostname = Utils.getHost(this.uri);
|
||||||
if (this._hostname === '') {
|
if (this._hostname === '') {
|
||||||
this._hostname = null;
|
this._hostname = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue