From 41d69672b713d35667669e7273f9f15f73f18a7f Mon Sep 17 00:00:00 2001 From: James Ide Date: Mon, 4 Sep 2017 23:59:51 -0700 Subject: [PATCH] [ios] Change intValue -> integerValue in RCTMultipartStreamReader We assign the value to an NSInteger so we should convert the NSString to an NSInteger instead of an int. --- React/Base/RCTMultipartStreamReader.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTMultipartStreamReader.m b/React/Base/RCTMultipartStreamReader.m index 529c595aef72e1..ad8c24c6dd1e75 100644 --- a/React/Base/RCTMultipartStreamReader.m +++ b/React/Base/RCTMultipartStreamReader.m @@ -76,7 +76,7 @@ - (void)emitProgress:(NSDictionary *)headers // Throttle progress events so we don't send more that around 60 per second. CFTimeInterval currentTime = CACurrentMediaTime(); - NSInteger headersContentLength = headers[@"Content-Length"] != nil ? [headers[@"Content-Length"] intValue] : 0; + NSInteger headersContentLength = headers[@"Content-Length"] != nil ? [headers[@"Content-Length"] integerValue] : 0; if (callback && (currentTime - _lastDownloadProgress > 0.016 || final)) { _lastDownloadProgress = currentTime; callback(headers, @(headersContentLength), @(contentLength));