Fix Xcode analyzer warning

Reviewed By: @nicklockwood

Differential Revision: D2517025

fb-gh-sync-id: 3948f6b4255bc9035b2e7441469d0cc31c8027f8
This commit is contained in:
Pieter De Baets 2015-10-08 05:25:37 -07:00 committed by facebook-github-bot-3
parent 83f14da0a3
commit 706cf38931
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}