diff --git a/Libraries/Network/RCTDataManager.m b/Libraries/Network/RCTDataManager.m index ed2c560d8..49ce6d754 100644 --- a/Libraries/Network/RCTDataManager.m +++ b/Libraries/Network/RCTDataManager.m @@ -134,12 +134,12 @@ typedef void (^RCTHTTPQueryResult)(NSError *error, NSDictionary *result); @implementation RCTActiveURLRequest -- (void)setResponse:(NSURLResponse *)response; +- (instancetype)init { - _response = response; - if (!_incrementalUpdates) { - _data = [[NSMutableData alloc] initWithCapacity:(NSUInteger)MAX(0, response.expectedContentLength)]; + if ((self = [super init])) { + _data = [[NSMutableData alloc] init]; } + return self; } @end