Skip to content

Commit

Permalink
Change intValue -> integerValue in RCTMultipartStreamReader
Browse files Browse the repository at this point in the history
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 facebook#15806

Differential Revision: D5767118

Pulled By: shergin

fbshipit-source-id: b310511f13f5f4026d595a219d69811801d313c2
  • Loading branch information
ide authored and facebook-github-bot committed Sep 5, 2017
1 parent efd728a commit 7d04fba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Base/RCTMultipartStreamReader.m
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 7d04fba

Please sign in to comment.