From 0d81438f39db0143f8753a64811fe4bb5dc5dd28 Mon Sep 17 00:00:00 2001 From: Cookiezaurs Date: Mon, 15 May 2023 15:02:00 +0300 Subject: [PATCH] codacy --- api/lib/countly.common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/lib/countly.common.js b/api/lib/countly.common.js index 8d3b13f16c8..0bd1dce5ef4 100644 --- a/api/lib/countly.common.js +++ b/api/lib/countly.common.js @@ -171,8 +171,8 @@ function getUniqArray(weeksArray_pd, weekCounts_pd, monthsArray_pd, monthCounts_ } for (i = 0; i < monthsArray.length; i++) { - if (parseInt(monthsArray[i]) === 0) { - if (parseInt(weeksArray[i]) === 0 || (rejectedWeeks.indexOf(weeksArray[i]) !== -1)) { + if (parseInt(monthsArray[i], 10) === 0) { + if (parseInt(weeksArray[i], 10) === 0 || (rejectedWeeks.indexOf(weeksArray[i]) !== -1)) { uniquePeriods[i] = periodArr[i]; } else { @@ -290,8 +290,8 @@ function getUniqCheckArray(weeksArray_pd, weekCounts_pd, monthsArray_pd, monthCo } for (i = 0; i < monthsArray.length; i++) { - if (parseInt(monthsArray[i]) === 0) { - if (parseInt(weeksArray[i]) !== 0) { + if (parseInt(monthsArray[i], 10) === 0) { + if (parseInt(weeksArray[i], 10) !== 0) { uniquePeriods[i] = weeksArray[i]; } }