From 38e2edec9763b21d3828c1e242f3c58133cf0de3 Mon Sep 17 00:00:00 2001 From: Naga Kiran Date: Wed, 17 Jun 2015 16:16:11 +0530 Subject: [PATCH] Related-Bug: #1462613 In getLabelValueForIP function, return empty string if given ip address string is empty. Earlier,it's returning "IPv4:" if we pass an empty ip address string Change-Id: Icf2b2821cfddbc3dffdff6f3ae47d254ffc3096a --- webroot/js/web-utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webroot/js/web-utils.js b/webroot/js/web-utils.js index a76d375dd..61c526c95 100644 --- a/webroot/js/web-utils.js +++ b/webroot/js/web-utils.js @@ -2730,6 +2730,9 @@ function getIPforHostName(name,dataSourceName) { function getLabelValueForIP(ip) { var lbl = 'IPv4'; var value = ip; + if(ip == '') { + return ''; + } if(ip != null && isIPv6(ip)) { lbl = 'IPv6'; value = new v6.Address(ip).correctForm();