This repository was archived by the owner on Jul 1, 2020. It is now read-only.
-
Couldn't load subscription status.
- Fork 55
Fixed revalidateAndAttachOnBlur method to handle zeroes appropriately #178
Merged
Merged
Changes from all commits
Commits
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 hidden or 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
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.
I'm not sure why you are inversing the check from
===to!==, that's a very big 360 from actual code. Also, not sure why I can see 2 commits attached to this PR but at the same time it shows only 1 file changed... very strange.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.
There are two commits with this because of line 182. We had discussed that
!!valueis probably not the correct check here, because it handles a value of0as a falsy value.My first commit, I changed
!!valueand replaced it with the different method for checking if a value exists......but then I realized it needed to be negated in this case.
!!valueessentially means ifvalueexists, enter the body of thisifblock. So that we handle0correctly, we need to check thatvalueexists by making sure it is not"",nullorundefined.The second commit fixes my mistake and negates the condition on line 182 so it keeps the same meaning as the original
!!value.Is that correct here?
Uh oh!
There was an error while loading. Please reload this page.
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.
Okay, I have to apologize.
Yes, the
!!valueshould be replaced by the more verbose check thatvalueis not"",null, orundefined, but the condition should use&&s instead of||s to properly negate the expression as a whole (otherwise it will always betrue).I understand there are multiple mistakes in this pull request. If you'd like to close this one, I can submit a "cleaner" one that should be correct from the start. My apologies, I think I got too excited to contribute to the repository and was being too hasty with my changes!
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.
haha don't be too rude on yourself, it's all good. 😉
I was just wondering why the inversion (
===to!==) as I thought it was an inversion of my code, and that would be a no no. But now I understand it was all your code from the start and yes it makes sense to do the!==with the&&The first PR is always stressful, but don't worry, it's all cool. I will probably merge tonight or tomorrow. 🙊
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.
Perfect! Thanks for the help and support!