From 40c2d6edcbdf9d84e8c85aedbf8c4432e92d392d Mon Sep 17 00:00:00 2001 From: PrasadNaidu Date: Mon, 5 Feb 2018 17:57:31 +0530 Subject: 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 --- portal/src/main/webapp/extsys/ems/js/commonUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'portal/src/main/webapp/extsys') 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; }; -- cgit 1.2.3-korg