Fix comparison between NSNumber* and int

Summary:
Strangely comparing a pointer with zero will only be a clang warning when compiling with `-Wpedantic`, so this incorrect comparison is silently allowed.

**Test plan**

Compiles with `-Wpedantic`.
Closes https://github.com/facebook/react-native/pull/11709

Differential Revision: D4377512

Pulled By: ericvicenti

fbshipit-source-id: 483cf1f41d3f539c452d542ad2155c4c4b41616d
This commit is contained in:
Dave Lee 2017-01-03 10:23:08 -08:00 committed by Facebook Github Bot
parent 26a8da898d
commit 7123618aa8
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ NSString *const RCTJavaScriptLoaderErrorDomain = @"RCTJavaScriptLoaderErrorDomai
NSMutableString *desc = [NSMutableString new];
[desc appendString:_status ?: @"Loading"];
if (_total > 0) {
if ([_total integerValue] > 0) {
[desc appendFormat:@" %ld%% (%@/%@)", (long)(100 * [_done integerValue] / [_total integerValue]), _done, _total];
}
[desc appendString:@"\u2026"];