-
Notifications
You must be signed in to change notification settings - Fork 176
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 checkValid error #145
Fix checkValid error #145
Conversation
return false; | ||
} | ||
return (form && form.$valid === true); | ||
return !!form && !!form.$valid; |
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.
cannot be
return form && form.$valid
?
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.
return form && form.$valid
will return undefined
or null
instead of false
, in case of the form
is undefined
or null
respectively. I just want this function to return boolean as we expected.
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.
!!(form && form.$valid)
more understandable?
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.
whatever it is, should be okay 😄
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's the same for me, but I could change it if you want.
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.
Ok then !!(form && form.$valid)
👍 Small change makes perfect 👍 |
Done! Need your confirmation. If it's ok, I'll merge it now. :) |
when travis ready, then sure 👍 |
This PR fixed an error when no argument, undefined, or null passed to the checkValid function.