Skip to content

chore: made code more robust to undefined expiry#6625

Merged
CommanderStorm merged 4 commits intolouislam:masterfrom
CommanderStorm:expiry-nan
Jan 6, 2026
Merged

chore: made code more robust to undefined expiry#6625
CommanderStorm merged 4 commits intolouislam:masterfrom
CommanderStorm:expiry-nan

Conversation

@CommanderStorm
Copy link
Collaborator

ℹ️ To keep reviews fast and effective, please make sure you’ve read our pull request guidelines

📝 Summary of changes done and why they are done

Not sure if this is just a bandait fix, but it gets the job done and is good under defensive programmingn anyhow.

Copilot AI review requested due to automatic review settings January 6, 2026 22:22
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 where domain expiry notifications could display "NaN days" when the expiry date is null or undefined. The fix adds a defensive check before calculating days remaining, preventing the notification from being sent with invalid data.

  • Added validation to skip notifications when domain expiry is null/undefined
  • Added regression tests for both null and undefined expiry scenarios

Reviewed changes

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

File Description
server/model/domain_expiry.js Added check to return early if domain.expiry is falsy, preventing NaN calculation
test/backend-test/test-domain.js Added two regression tests to verify notifications are not sent when expiry is null or undefined

CommanderStorm and others added 3 commits January 6, 2026 23:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CommanderStorm CommanderStorm enabled auto-merge (squash) January 6, 2026 22:34
@CommanderStorm CommanderStorm merged commit 88e7887 into louislam:master Jan 6, 2026
23 checks passed
@CommanderStorm CommanderStorm added this to the 2.1.0 milestone Jan 7, 2026
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.

Domain name xxxxx will expire in NaN days

2 participants