Fix TurboCxxModules::get
Summary: Make `TurboCxxModule::get` return `undefined` when trying to access methods that don't exist. This is what `TurboModule::get` does. So, it makes sense that this behaviour is preserved in TurboCxxModule. Reviewed By: mdvacca Differential Revision: D15780044 fbshipit-source-id: 13aeae081655735ef634f1dc09c0dc70a3a3a893
This commit is contained in:
Родитель
6c0eccd46d
Коммит
e908f7a3fe
|
@ -68,7 +68,7 @@ jsi::Value TurboCxxModule::get(jsi::Runtime& runtime, const jsi::PropNameID& pro
|
|||
}
|
||||
}
|
||||
|
||||
throw std::runtime_error("Function '" + propNameUtf8 + "' cannot be found on cxxmodule: " + name_);
|
||||
return jsi::Value::undefined();
|
||||
}
|
||||
|
||||
jsi::Value TurboCxxModule::invokeMethod(
|
||||
|
|
Загрузка…
Ссылка в новой задаче