mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-05 17:30:38 +08:00
Allow ModuleRegistry initialization to complete lazily
Reviewed By: mhorowitz Differential Revision: D4794794 fbshipit-source-id: f3b7a5d02587b4cd4e214aa6b0368a0d214fb63f
This commit is contained in:
committed by
Facebook Github Bot
parent
568fb403bf
commit
b2647ea335
@@ -45,10 +45,6 @@ folly::Optional<Object> JSCNativeModules::createModule(const std::string& name,
|
||||
auto global = Object::getGlobalObject(context);
|
||||
m_genNativeModuleJS = global.getProperty("__fbGenNativeModule").asObject();
|
||||
m_genNativeModuleJS->makeProtected();
|
||||
|
||||
// Initialize the module name list, otherwise getModuleConfig won't work
|
||||
// TODO (pieterdb): fix this in ModuleRegistry
|
||||
m_moduleRegistry->moduleNames();
|
||||
}
|
||||
|
||||
auto result = m_moduleRegistry->getConfig(name);
|
||||
|
||||
Reference in New Issue
Block a user