mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
add error logs for nil moduleRegistry
Summary: Changelog: [Internal] for the last 6 months or so, we've been getting this task where the moduleRegistry in RCTDeviceInfo is nil. in this change, i add some logs to see what might be setting this to nil. in all honestly, i don't really think this is happening, but it would be good to verify. Reviewed By: sshic Differential Revision: D34908902 fbshipit-source-id: d375285467a87453605ba0fecfc124bc3bff6e63
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bc53279a56
commit
9b4bb54fdf
@@ -69,6 +69,14 @@ RCT_EXPORT_MODULE()
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)setModuleRegistry:(RCTModuleRegistry *)moduleRegistry
|
||||
{
|
||||
if (!moduleRegistry) {
|
||||
RCTAssert(false, @"moduleRegistry should not be nil, _moduleRegistry is nil: %d", _moduleRegistry == nil);
|
||||
}
|
||||
_moduleRegistry = moduleRegistry;
|
||||
}
|
||||
|
||||
static BOOL RCTIsIPhoneX()
|
||||
{
|
||||
static BOOL isIPhoneX = NO;
|
||||
|
||||
Reference in New Issue
Block a user