Fix crash when overriding native modules on RCTJSCExecutor
Reviewed By: alexeylang Differential Revision: D4769955 fbshipit-source-id: 20f4f4c469eafbe2c7a81ad9f5b9a8386195a8ac
This commit is contained in:
parent
893689c82b
commit
3f46e591ff
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
const BatchedBridge = require('BatchedBridge');
|
const BatchedBridge = require('BatchedBridge');
|
||||||
|
|
||||||
const defineLazyObjectProperty = require('defineLazyObjectProperty');
|
|
||||||
const invariant = require('fbjs/lib/invariant');
|
const invariant = require('fbjs/lib/invariant');
|
||||||
|
|
||||||
type ModuleConfig = [
|
type ModuleConfig = [
|
||||||
|
@ -125,6 +124,7 @@ if (global.nativeModuleProxy) {
|
||||||
const bridgeConfig = global.__fbBatchedBridgeConfig;
|
const bridgeConfig = global.__fbBatchedBridgeConfig;
|
||||||
invariant(bridgeConfig, '__fbBatchedBridgeConfig is not set, cannot invoke native modules');
|
invariant(bridgeConfig, '__fbBatchedBridgeConfig is not set, cannot invoke native modules');
|
||||||
|
|
||||||
|
const defineLazyObjectProperty = require('defineLazyObjectProperty');
|
||||||
(bridgeConfig.remoteModuleConfig || []).forEach((config: ModuleConfig, moduleID: number) => {
|
(bridgeConfig.remoteModuleConfig || []).forEach((config: ModuleConfig, moduleID: number) => {
|
||||||
// Initially this config will only contain the module name when running in JSC. The actual
|
// Initially this config will only contain the module name when running in JSC. The actual
|
||||||
// configuration of the module will be lazily loaded.
|
// configuration of the module will be lazily loaded.
|
||||||
|
|
Loading…
Reference in New Issue