Fix _.maxBy and _.minBy (#4233)

This commit is contained in:
Amu
2019-03-12 12:43:45 +08:00
committed by John-David Dalton
parent e7221b96ec
commit c541e4ccdc
2 changed files with 2 additions and 2 deletions

View File

@@ -22,8 +22,8 @@ function maxBy(array, iteratee) {
if (array == null) {
return result
}
let computed
for (const value of array) {
let computed
const current = iteratee(value)
if (current != null && (computed === undefined

View File

@@ -22,8 +22,8 @@ function minBy(array, iteratee) {
if (array == null) {
return result
}
let computed
for (const value of array) {
let computed
const current = iteratee(value)
if (current != null && (computed === undefined