Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKamalov committed Aug 22, 2019
1 parent 0bd722c commit c8052c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/helpers/helpers.js
Expand Up @@ -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}`;
}
}
Expand Down

0 comments on commit c8052c2

Please sign in to comment.