Closed bebraw closed 9 years ago
I tend to play fast and loose with passing null
and undefined
values around. I usually do a variable == null
test to catch both cases, which is admittedly a somewhat cryptic idiom, or !variable
if I don't expect strings or numbers to be passed in. In this particular case I believe that the || errors === null
after the !errors
test is redundant.
On Friday, 27 March 2015, Olaf Delgado-Friedrichs notifications@github.com wrote:
I tend to play fast and loose with passing null and undefined values around. I usually do a variable == null test to catch both cases, which is admittedly a somewhat cryptic idiom, or !variable if I don't expect strings or numbers to be passed in. In this particular case I believe that the || errors === null after the !errors test is redundant.
Yeah, that's true. I will change the PR.
— Reply to this email directly or view it on GitHub https://github.com/AppliedMathematicsANU/plexus-form/pull/25#issuecomment-86774216 .
I removed the extra check.
Sorry for the long wait! That shouldn't have taken me 5 days.
No problems. :)
Just noticed
errorClass
generator can fail ifprops.errors
is undefined. It's another question why that can happen in the first place of course.