Skip to content

Commit 496a231

Browse files
committed
fix node engines w/out Array.prototype.findIndex
1 parent bcf724a commit 496a231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

find-key.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
module.exports = findKey
1414

1515
function findKey (obj, callback, thisArg) {
16-
if (Array.isArray(obj)) {
16+
if (Array.isArray(obj) && obj.findIndex) {
1717
var index = obj.findIndex(callback, thisArg)
1818
return ~index ? index : undefined
1919
}

0 commit comments

Comments
 (0)