Skip to content

Commit

Permalink
codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
Cookiezaurs committed May 15, 2023
1 parent 504f8aa commit 0d81438
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/lib/countly.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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];
}
}
Expand Down

0 comments on commit 0d81438

Please sign in to comment.