From c8052c23d190ebcc8437a1c61b08e685e5657e70 Mon Sep 17 00:00:00 2001
From: Ildar Kamalov <i.kamalov@adguard.com>
Date: Thu, 22 Aug 2019 18:50:58 +0300
Subject: [PATCH] fix condition

---
 client/src/helpers/helpers.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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}`;
         }
     }