mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove __fbRequireBatchedBridge call when not get batchedBridge (#23547)
Summary: From the git log, we added `__fbRequireBatchedBridge` in this commit https://github.com/facebook/react-native/commit/6dc3a83e88ed120decbeaed8e4e62dc2bb7107a3, I don't ensure wether I missed something, we actually don't define `__fbRequireBatchedBridge` on `JS` or `Native` side, so `__fbRequireBatchedBridge` getter operation itself would throw exception. [General] [Fixed] - Remove __fbRequireBatchedBridge call when not get batchedBridge Pull Request resolved: https://github.com/facebook/react-native/pull/23547 Differential Revision: D14160706 Pulled By: cpojer fbshipit-source-id: df9180a9a16716a91369249333752316fb6648c5
This commit is contained in:
committed by
Facebook Github Bot
parent
104b1f9367
commit
96de12ab48
@@ -285,13 +285,8 @@ void JSIExecutor::bindBridge() {
|
||||
Value batchedBridgeValue =
|
||||
runtime_->global().getProperty(*runtime_, "__fbBatchedBridge");
|
||||
if (batchedBridgeValue.isUndefined()) {
|
||||
Function requireBatchedBridge = runtime_->global().getPropertyAsFunction(
|
||||
*runtime_, "__fbRequireBatchedBridge");
|
||||
batchedBridgeValue = requireBatchedBridge.call(*runtime_);
|
||||
if (batchedBridgeValue.isUndefined()) {
|
||||
throw JSINativeException(
|
||||
"Could not get BatchedBridge, make sure your bundle is packaged correctly");
|
||||
}
|
||||
throw JSINativeException(
|
||||
"Could not get BatchedBridge, make sure your bundle is packaged correctly");
|
||||
}
|
||||
|
||||
Object batchedBridge = batchedBridgeValue.asObject(*runtime_);
|
||||
|
||||
Reference in New Issue
Block a user