mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 16:10:58 +00:00
[ReactNative] Check if bridge is valid on -modules
This commit is contained in:
parent
8e2727ad52
commit
de1320acc7
@ -1081,6 +1081,10 @@ RCT_INNER_BRIDGE_ONLY(_invokeAndProcessModule:(NSString *)module method:(NSStrin
|
||||
|
||||
- (NSDictionary *)modules
|
||||
{
|
||||
if (!self.isValid) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
RCTAssert(_modulesByName != nil, @"Bridge modules have not yet been initialized. "
|
||||
"You may be trying to access a module too early in the startup procedure.");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user