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:
parent
26a8da898d
commit
7123618aa8
|
@ -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"];
|
||||
|
|
Loading…
Reference in New Issue