getCurrentConnectivity should resolve with object
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 https://github.com/facebook/react-native/pull/6373 Differential Revision: D3032773 fb-gh-sync-id: edc545548d3c17387545b6c59894c27e4563cb18 shipit-source-id: edc545548d3c17387545b6c59894c27e4563cb18
This commit is contained in:
parent
4c49db4489
commit
336dbe4c00
|
@ -90,7 +90,7 @@ static void RCTReachabilityCallback(__unused SCNetworkReachabilityRef target, SC
|
|||
RCT_EXPORT_METHOD(getCurrentConnectivity:(RCTPromiseResolveBlock)resolve
|
||||
reject:(__unused RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
resolve(@[@{@"network_info": _status}]);
|
||||
resolve(@{@"network_info": _status});
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue