-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
_.eq redundant comparison when both null #2629
Comments
Yah, looks like we could. Want to open a PR? |
Nice, I have opened a PR #2630 |
@ahonn since we are using |
Yes, but we've already done a |
Ah, I completely missed that :| Thanks @jridgewell! |
When running |
in
_.eq
function:a === b is true when a = null and b = null, so the function will return true.
and then, if
(a == null || b == null)
is true, return a === b.It would never be true, why not directly return false:
I checked the #2180 and #2179 , but I still don't understand why not directly return false?
The text was updated successfully, but these errors were encountered: