Skip to content

Commit

Permalink
getCurrentConnectivity should resolve with object
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrlaessig authored and Facebook Github Bot 5 committed Mar 10, 2016
1 parent 4c49db4 commit 336dbe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Network/RCTNetInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ - (void)dealloc
RCT_EXPORT_METHOD(getCurrentConnectivity:(RCTPromiseResolveBlock)resolve
reject:(__unused RCTPromiseRejectBlock)reject)
{
resolve(@[@{@"network_info": _status}]);
resolve(@{@"network_info": _status});
}

@end

0 comments on commit 336dbe4

Please sign in to comment.