If Server has a port specified, use it in the api url

This commit is contained in:
Isaac Connor
2025-11-04 10:30:39 -05:00
parent 4b5d7c11f0
commit b7c4e52d99

View File

@@ -45,8 +45,8 @@ var Server = function() {
key: 'urlToApi',
value: function urlToApi() {
const port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return (location.protocol=='https:'? 'https:' : this.Protocol+':') + '//' + this.Hostname + (port ? ':' + port : '') + ((this.PathToApi && (this.PathToApi != 'null')) ? this.PathToApi : '');
}
return (location.protocol=='https:'? 'https:' : this.Protocol+':') + '//' + this.Hostname + (port ? ':' + port : (this.Port ? ':' + this.Port : '')) + ((this.PathToApi && (this.PathToApi != 'null')) ? this.PathToApi : '');
}
},
{
key: 'getFromApi',