Skip to content

Commit

Permalink
Merge pull request taofed#3 from cpunion/remove-array-find-index
Browse files Browse the repository at this point in the history
Remove array-find-index
  • Loading branch information
flyskywhy authored Jun 27, 2017
2 parents da986d8 + 2ae8bc9 commit c536846
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Libraries/NetInfo/NetInfo.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'use strict';

import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment';
import findIndex from 'array-find-index';
import invariant from 'fbjs/lib/invariant';

const connection =
Expand Down Expand Up @@ -88,7 +87,7 @@ const NetInfo = {
type
);

const listenerIndex = findIndex(connectionListeners, pair => pair[0] === handler);
const listenerIndex = connectionListeners.findIndex(pair => pair[0] === handler);
invariant(
listenerIndex !== -1,
'Trying to remove NetInfo connection listener for unregistered handler'
Expand Down

0 comments on commit c536846

Please sign in to comment.