Skip to content

Commit 9c6e483

Browse files
committed
Use Array.prototype.find instead of array-find-index
1 parent c49dff7 commit 9c6e483

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Libraries/NetInfo/NetInfo.web.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
'use strict';
1010

1111
import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment';
12-
import findIndex from 'array-find-index';
1312
import invariant from 'fbjs/lib/invariant';
1413

1514
const connection =
@@ -88,7 +87,7 @@ const NetInfo = {
8887
type
8988
);
9089

91-
const listenerIndex = findIndex(connectionListeners, pair => pair[0] === handler);
90+
const listenerIndex = connectionListeners.findIndex(pair => pair[0] === handler);
9291
invariant(
9392
listenerIndex !== -1,
9493
'Trying to remove NetInfo connection listener for unregistered handler'

0 commit comments

Comments
 (0)