mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Bump to v4.16.5.
This commit is contained in:
@@ -12,8 +12,7 @@ define(['./_baseFindIndex', './_baseIteratee', './toInteger'], function(baseFind
|
||||
* @since 1.1.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Function} [predicate=_.identity]
|
||||
* The function invoked per iteration.
|
||||
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
||||
* @param {number} [fromIndex=0] The index to search from.
|
||||
* @returns {number} Returns the index of the found element, else `-1`.
|
||||
* @example
|
||||
@@ -40,7 +39,7 @@ define(['./_baseFindIndex', './_baseIteratee', './toInteger'], function(baseFind
|
||||
* // => 2
|
||||
*/
|
||||
function findIndex(array, predicate, fromIndex) {
|
||||
var length = array ? array.length : 0;
|
||||
var length = array == null ? 0 : array.length;
|
||||
if (!length) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user