diff --git a/client/src/helpers/helpers.js b/client/src/helpers/helpers.js index c9c270c3..aeeba588 100644 --- a/client/src/helpers/helpers.js +++ b/client/src/helpers/helpers.js @@ -139,10 +139,10 @@ export const getWebAddress = (ip, port = '') => { const isStandardWebPort = port === STANDARD_WEB_PORT; let address = `http://${ip}`; - if (port) { - if (ip.includes(':') && !ip.includes('[') && !isStandardWebPort) { + if (port && !isStandardWebPort) { + if (ip.includes(':') && !ip.includes('[')) { address = `http://[${ip}]:${port}`; - } else if (!isStandardWebPort) { + } else { address = `http://${ip}:${port}`; } }