Don't allow unsetting a region in RCTMapView

Reviewed By: javache

Differential Revision: D3723065

fbshipit-source-id: c922d03fa6c2a696b2ec00965b17b7215060aee5
This commit is contained in:
Mehdi Mulani 2016-08-16 10:50:39 -07:00 committed by Facebook Github Bot 9
parent 7ca3764eae
commit e9d6f29b64

View File

@ -103,7 +103,9 @@ RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
RCT_CUSTOM_VIEW_PROPERTY(region, MKCoordinateRegion, RCTMap)
{
[view setRegion:json ? [RCTConvert MKCoordinateRegion:json] : defaultView.region animated:YES];
if (json) {
[view setRegion:[RCTConvert MKCoordinateRegion:json] animated:YES];
}
}
#pragma mark MKMapViewDelegate