mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-18 12:47:49 +08:00
Remove __fbRequireBatchedBridge call when not get batchedBridge (#23547)
Summary:
From the git log, we added `__fbRequireBatchedBridge` in this commit 6dc3a83e88, 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