mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Bump to v4.11.2.
This commit is contained in:
4
maxBy.js
4
maxBy.js
@@ -1,6 +1,6 @@
|
||||
import baseExtremum from './_baseExtremum';
|
||||
import baseGt from './_baseGt';
|
||||
import baseIteratee from './_baseIteratee';
|
||||
import gt from './gt';
|
||||
|
||||
/**
|
||||
* This method is like `_.max` except that it accepts `iteratee` which is
|
||||
@@ -28,7 +28,7 @@ import gt from './gt';
|
||||
*/
|
||||
function maxBy(array, iteratee) {
|
||||
return (array && array.length)
|
||||
? baseExtremum(array, baseIteratee(iteratee), gt)
|
||||
? baseExtremum(array, baseIteratee(iteratee), baseGt)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user