mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
] Fix native module check when not using batched bridge (#49483)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49483 Changelog: [internal] Reviewed By: fabriziocucci Differential Revision: D69753755 fbshipit-source-id: fe267ed60b5f7d6baac7dee5d7be0f733b34e9e9
This commit is contained in:
1 parent
3a4798cc30
commit
e57cd0916c
1 file changed
+5
-5
@@ -77,16 +77,16 @@ std::optional<Object> JSINativeModules::createModule(
|
||||
ReactMarker::NATIVE_MODULE_SETUP_START, name.c_str());
|
||||
}
|
||||
|
||||
if (!m_genNativeModuleJS) {
|
||||
m_genNativeModuleJS =
|
||||
rt.global().getPropertyAsFunction(rt, "__fbGenNativeModule");
|
||||
}
|
||||
|
||||
auto result = m_moduleRegistry->getConfig(name);
|
||||
if (!result.has_value()) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (!m_genNativeModuleJS) {
|
||||
m_genNativeModuleJS =
|
||||
rt.global().getPropertyAsFunction(rt, "__fbGenNativeModule");
|
||||
}
|
||||
|
||||
Value moduleInfo = m_genNativeModuleJS->call(
|
||||
rt,
|
||||
valueFromDynamic(rt, result->config),
|
||||
|
||||
Reference in new issue
Block a user