-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getCurrentConnectivity should resolve with object #6373
Conversation
By analyzing the blame information on this pull request, we identified @satya164, @nicklockwood and @vjeux to be potential reviewers. |
As far as I can see Android looks good. But never tested. |
I've also noticed that |
I think |
ccing @dmmiller too |
Apparently all other @corbt The code should now work as described in the documentation. |
sweet, thanks again for working on this @l-urence. @facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
336dbe4
Thanks for catching this one. |
Summary:`getCurrentConnectivity()` should resolve with object instead of array otherwise in `NetInfo.fetch().done(reach => console.log('Initial: ' + reach))` `reach` will be undefined (see https://github.com/l-urence/react-native/blob/master/Libraries/Network/NetInfo.js#L200). cc satya164 Closes #6373 Differential Revision: D3032773 fb-gh-sync-id: edc545548d3c17387545b6c59894c27e4563cb18 shipit-source-id: edc545548d3c17387545b6c59894c27e4563cb18
I upgraded to 0.22 today. I am getting the following error: |
@shraddha1704 this PR was picked into 0.22 release. |
Found a solution. Replacing the fetch function in NetInfo.js with: |
@shraddha1704 Your native code seems to be out of date. Run |
Summary:`getCurrentConnectivity()` should resolve with object instead of array otherwise in `NetInfo.fetch().done(reach => console.log('Initial: ' + reach))` `reach` will be undefined (see https://github.com/l-urence/react-native/blob/master/Libraries/Network/NetInfo.js#L200). cc satya164 Closes facebook#6373 Differential Revision: D3032773 fb-gh-sync-id: edc545548d3c17387545b6c59894c27e4563cb18 shipit-source-id: edc545548d3c17387545b6c59894c27e4563cb18
getCurrentConnectivity()
should resolve with object instead of array otherwise inNetInfo.fetch().done(reach => console.log('Initial: ' + reach))
reach
will be undefined (see https://github.com/l-urence/react-native/blob/master/Libraries/Network/NetInfo.js#L200).cc @satya164