-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
BugFix : Fixed Improper Handling for Non-Numeric Values in Allotted hours section of Create Action item modal #3379
Closed
yugal07
wants to merge
13
commits into
PalisadoesFoundation:develop-postgres
from
yugal07:issue-3368
Closed
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6e67a76
Proper Handling for non numeric values in allotted hours section of a…
yugal07 13d4ef6
Added test cases and used Number.isNaN instead of isNaN
yugal07 6374d21
Removed code coverage disable lines that past contributors added and …
yugal07 fef4754
Added more test cases to improve code coverage
yugal07 4d575ac
Bugfix: fixed duplication of chats (#3360)
Aad1tya27 4fe4264
Update pull-request.yml
palisadoes e0b3ca7
Fixes: The Login and Organization Screens (#3309)
prathmesh703 ddfa246
Fixed ESLint bugs that required ts-specific rules for js functions an…
yugal07 d874f00
Fixes[MemberDetail] : Refactor CSS files in src/screens/MemberDetail …
Bittukr7479 190722a
refactor CSS src/components/EventRegistrantsModal (#3383)
prathmesh703 1423156
Updated incorrect color names (#3395)
palisadoes 54de360
Tests: Added tests for ```src/components/MemberRequestCard/MemberRequ…
Aad1tya27 14615bb
Implemented coderabbit suggestion and added more test cases to improv…
yugal07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🛠️ Refactor suggestion
Enhance the validation logic for allotted hours.
The current validation can be improved for better type safety and explicit handling:
isNaN
withNumber.isNaN
to avoid type coercion.📝 Committable suggestion
🧰 Tools
🪛 Biome (1.9.4)
[error] 233-233: isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead.
See the MDN documentation for more details.
Unsafe fix: Use Number.isNaN instead.
(lint/suspicious/noGlobalIsNan)
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.
Done
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.
@yugal07 I can still see the old code in the file. The changes we discussed (using
Number.isNaN
and making the validation more explicit) don't appear to be implemented yet. Could you please verify if you've committed the changes? Here's what I'm seeing in the file:Let me know if you need any help with implementing the suggested changes!
🔗 Analysis chain
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 372
Script:
Length of output: 65
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.
It loses functionality if i add all your code. I have replaced isNaN with Number.isNaN
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.
@yugal07 You're absolutely right! The
typeof
check in the original code is important for proper form state management. Thank you for implementing theNumber.isNaN
change while preserving the necessary type checking functionality.✏️ Learnings added
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!