Merge: - client: fix IPv6 redirect url for install

* commit 'c8052c23d190ebcc8437a1c61b08e685e5657e70':
  fix condition
  - client: fix IPv6 redirect url for install
This commit is contained in:
Ildar Kamalov 2019-08-23 13:54:44 +03:00
commit fb2c625bd1
1 changed files with 3 additions and 3 deletions

View File

@ -139,10 +139,10 @@ export const getWebAddress = (ip, port = '') => {
const isStandardWebPort = port === STANDARD_WEB_PORT;
let address = `http://${ip}`;
if (port) {
if (ip.includes(':') && !isStandardWebPort) {
if (port && !isStandardWebPort) {
if (ip.includes(':') && !ip.includes('[')) {
address = `http://[${ip}]:${port}`;
} else if (!isStandardWebPort) {
} else {
address = `http://${ip}:${port}`;
}
}