-
Notifications
You must be signed in to change notification settings - Fork 843
Fix isNullish to not consider an empty string as Null. #108
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
Conversation
An empty string is still a perfectly valid string, in both situations: (1) An empty string is a valid string argument to a handler. (2) An empty string is a valid non-null result from a handler. I also removed the unused and unnecessary PrivateName value from the NonNull struct -- it served no purpose and screwed up tests when isNullish was fixed.
+1 |
@sogko Is there any reason not to merge this apart from the need to rebase? It's currently a little bit annoying that no empty strings are supported. |
Like @Matthias247 said, any reason this major bug fix has not been merged? |
Would love to see this fix land. |
Agreed. Any news on this one? @sogko |
+1 |
+1 Please land this |
@sogko @chris-ramon I think we should cleanup/update this PR (or create a fresh one) and get this change rolling along. The behavior can definitely be confusing, but it's not a small change (as far as who it reaches) as it's a breaking API change if people are depending on the current behavior. But after discussion in #183 I'm convinced that |
closing this one in favor of #228 — thanks a lot @augustoroman 👍 |
An empty string is still a perfectly valid string, in both situations:
(1) An empty string is a valid string argument to a handler.
(2) An empty string is a valid non-null result from a handler.
I also removed the unused and unnecessary PrivateName value from the
NonNull struct -- it served no purpose and screwed up tests when isNullish
was fixed.
See also #107