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
Method sumBy
returns string
#5818
Comments
Lets see how JS behaves in this case: > 1 + 'f' + null
"1fnull" So Lodash is doing things right! If you actually do want to have |
@AmanAmbasta |
It's not returning _.sumBy([{ a: 1 }, { a: 'f' }, { a: null }], 'a'); // '1fnull' |
There are cases when method
sumBy
could returnstring
instead ofnumber
.Current behavior:
Returned value is of type string.
Expected behavior:
Returned value is of type number.
The text was updated successfully, but these errors were encountered: