Change intValue -> integerValue in RCTMultipartStreamReader

Summary:
We assign the value to an NSInteger so we should convert the NSString to an NSInteger instead of an int.

Build the app in Xcode and run it.
Closes https://github.com/facebook/react-native/pull/15806

Differential Revision: D5767118

Pulled By: shergin

fbshipit-source-id: b310511f13f5f4026d595a219d69811801d313c2
This commit is contained in:
James Ide 2017-09-05 09:48:19 -07:00 коммит произвёл Facebook Github Bot
Родитель efd728ab7e
Коммит 7d04fbaba2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -76,7 +76,7 @@
// Throttle progress events so we don't send more that around 60 per second. // Throttle progress events so we don't send more that around 60 per second.
CFTimeInterval currentTime = CACurrentMediaTime(); 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)) { if (callback && (currentTime - _lastDownloadProgress > 0.016 || final)) {
_lastDownloadProgress = currentTime; _lastDownloadProgress = currentTime;
callback(headers, @(headersContentLength), @(contentLength)); callback(headers, @(headersContentLength), @(contentLength));