Show yellowbox when we fail to load a local image
Reviewed By: achen1 Differential Revision: D4342295 fbshipit-source-id: 9411ffe9a376e1ed51fcadee718326d1d9443fff
This commit is contained in:
parent
d3d5d7b7c9
commit
ac11eedfb0
|
@ -105,6 +105,7 @@ static NSBundle *bundleForPath(NSString *key)
|
|||
completionHandler(nil, image);
|
||||
} else {
|
||||
NSString *message = [NSString stringWithFormat:@"Could not find image named %@", imageName];
|
||||
RCTLogWarn(@"%@", message);
|
||||
completionHandler(RCTErrorWithMessage(message), nil);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -33,10 +33,12 @@ class RCTLog {
|
|||
logFn,
|
||||
'Level "' + level + '" not one of ' + Object.keys(levelsMap)
|
||||
);
|
||||
if (typeof global.nativeLoggingHook === 'undefined') {
|
||||
if (typeof global.nativeLoggingHook === 'undefined' || level === 'warn') {
|
||||
// We already printed in xcode, so only log here if using a js debugger
|
||||
// or if we're trying to send a yellow box from native down.
|
||||
console[logFn].apply(console, args);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue