-
-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(date): don't allow parameters <= 0 #1536
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #1536 +/- ##
=======================================
Coverage 99.64% 99.64%
=======================================
Files 2214 2214
Lines 238725 238741 +16
Branches 1015 1023 +8
=======================================
+ Hits 237869 237885 +16
Misses 835 835
Partials 21 21
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an alternative we could treat the <=0
as zero returning effectively now
/refDate
(minus/plus 1 second to be in the past/future).
IMO this is not directly part of this issue. I would like to have this fixed to proceed with #1534. |
While working on #1534 I found this bug and extracted it to this PR.
Before this fix,
values === 0
would be treated as falsy value and fallback to1
.We want to prevent this behavior directly and now throw an error when the user tries to use values below or equals to 0.