We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ff3007 commit a6c63b5Copy full SHA for a6c63b5
src/utils/findIndex.js
@@ -1,4 +1,9 @@
1
function findIndex(arr, predicate, thisArg) {
2
+ // if native support is available, ship it off
3
+ if (Array.prototype.findIndex) {
4
+ return arr.findIndex(predicate, thisArg)
5
+ }
6
+
7
if (!arr) {
8
throw new TypeError('findIndex called on null or undefined')
9
}
0 commit comments