Fix Xcode analyzer warning
Reviewed By: @nicklockwood Differential Revision: D2517025 fb-gh-sync-id: 3948f6b4255bc9035b2e7441469d0cc31c8027f8
This commit is contained in:
parent
83f14da0a3
commit
706cf38931
|
@ -436,13 +436,13 @@ RCT_CGSTRUCT_CONVERTER(CGAffineTransform, (@[
|
|||
if (!XCAssetMap) {
|
||||
XCAssetMap = [NSMutableDictionary new];
|
||||
}
|
||||
NSNumber *isAsset = XCAssetMap[path];
|
||||
NSNumber *isAsset = XCAssetMap[URL.path];
|
||||
if (!isAsset || isAsset.boolValue) {
|
||||
image = [UIImage imageNamed:URL.path];
|
||||
}
|
||||
if (!isAsset) {
|
||||
// Avoid calling `+imageNamed` again in future if it's not needed.
|
||||
XCAssetMap[path] = @(image != nil);
|
||||
XCAssetMap[URL.path] = @(image != nil);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue