mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
[ReactNative] Preload ModuleData queue
Summary: The module's methodQueue wasn't being created when accessing the modules directly on the bridge, without going through JS. Preload the queue for now to fix internal breakages, but I'll figure out a better way to keep it lazy afterwards.
This commit is contained in:
1 parent
2d66e10ec4
commit
331e4a96e9
1 file changed
+4
@@ -305,6 +305,10 @@ id<RCTJavaScriptExecutor> RCTGetLatestExecutor(void)
|
||||
for (RCTModuleData *moduleData in _moduleDataByID) {
|
||||
config[moduleData.name] = moduleData.config;
|
||||
|
||||
|
||||
// HACK(tadeu): Ensure the queue has been loaded, make it lazy later inside RCTModuleMap
|
||||
(void)[moduleData queue];
|
||||
|
||||
if ([moduleData.instance conformsToProtocol:@protocol(RCTFrameUpdateObserver)]) {
|
||||
[_frameUpdateObservers addObject:moduleData];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user