Skip to content

Commit

Permalink
Fix unrecognized selector error
Browse files Browse the repository at this point in the history
Summary:
Fixes "[NSTaggedPointerString unsignedIntValue]: unrecognized selector" error
Closes facebook#15755

Differential Revision: D5763628

Pulled By: shergin

fbshipit-source-id: 6e1d1b1ae6bc63e07112b9dddcdf8e6f812a7f51
  • Loading branch information
giladno authored and ide committed Sep 19, 2017
1 parent 021b0f4 commit 6b9a5b6
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();

NSUInteger headersContentLength = headers[@"Content-Length"] != nil ? [headers[@"Content-Length"] unsignedIntValue] : 0;
NSInteger headersContentLength = headers[@"Content-Length"] != nil ? [headers[@"Content-Length"] intValue] : 0;
if (callback && (currentTime - _lastDownloadProgress > 0.016 || final)) {
_lastDownloadProgress = currentTime;
callback(headers, @(headersContentLength), @(contentLength));
Expand Down

0 comments on commit 6b9a5b6

Please sign in to comment.