Skip to content

Commit

Permalink
Related-Bug: #1462613
Browse files Browse the repository at this point in the history
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
  • Loading branch information
knagakiran committed Jun 17, 2015
1 parent 79ea5b4 commit 106fa49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webroot/js/web-utils.js
Expand Up @@ -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();
Expand Down

0 comments on commit 106fa49

Please sign in to comment.