mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +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:
committed by
Facebook GitHub Bot
parent
3a4798cc30
commit
e57cd0916c
@@ -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