Fix :NaN port returned by dappsUrl

This commit is contained in:
maciejhirsz 2017-09-22 13:48:09 +02:00
parent 1b7c90e9e1
commit 339f63a61a
1 changed files with 4 additions and 2 deletions

View File

@ -82,7 +82,7 @@ export default class SecureApi extends Api {
return {
host,
port: parseInt(port, 10)
port: port ? parseInt(port, 10) : null
};
}
@ -93,7 +93,9 @@ export default class SecureApi extends Api {
get dappsUrl () {
const { port } = this._dappsAddress;
return `${this.protocol()}//${this.hostname}:${port}`;
return port
? `${this.protocol()}//${this.hostname}:${port}`
: `${this.protocol()}//${this.hostname}`;
}
get hostname () {