From: PrasadNaidu Date: Mon, 5 Feb 2018 12:27:31 +0000 (+0530) Subject: Sonar Major X-Git-Tag: v1.1.0~12^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=40c2d6edcbdf9d84e8c85aedbf8c4432e92d392d;p=aai%2Fesr-gui.git Sonar Major Replace == with === commonUtil.js:L47 Sonar Link : https://sonar.onap.org/component_issues/index?id=org.onap.aai.esr-gui%3Aaai-esr-gui#resolved=false|severities=MAJOR Location : src/main/webapp/extsys/ems/js/commonUtil.jsChange-Id: I1f0960a64f18ad22872f025899249ffa47dab526 Change-Id: Iab29d3ac7a6049a0c482f87fb312ab7db8a11d78 Issue-ID: AAI-730 Signed-off-by: PrasadNaidu --- diff --git a/portal/src/main/webapp/extsys/ems/js/commonUtil.js b/portal/src/main/webapp/extsys/ems/js/commonUtil.js index cd56bd1..292fbe1 100644 --- a/portal/src/main/webapp/extsys/ems/js/commonUtil.js +++ b/portal/src/main/webapp/extsys/ems/js/commonUtil.js @@ -44,7 +44,7 @@ commonUtil.parseDate = function (dateObj, format) { (dateObj.getFullYear() + "").substr(4 - RegExp.$1.length)); for (var k in o) if (new RegExp("(" + k + ")").test(format)) - format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : + format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); return format; };