Skip to content

Conversation

@widatama
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in period calculation logic within the countly.common.js module. The issue was in how certain date/period strings were being marked as invalid.

Changes:

  • Fixed incorrect use of .replace() method in getUniqArray and getUniqCheckArray functions that was performing substring replacement instead of exact value replacement
  • Updated CHANGELOG to document the fix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
api/lib/countly.common.js Fixed bug in 4 locations where .replace(key, 0) was incorrectly performing substring replacement; changed to use strict equality check with direct assignment to '0'
CHANGELOG.md Added entry documenting the fix for getuniqarray and getuniqcheckarray functions

@widatama widatama merged commit d86c3c5 into master Jan 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants