mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-29 07:48:17 +08:00
Fixed bug where module with moduleID of zero wouldn't be loaded
Reviewed By: jspahrsummers Differential Revision: D2744167 fb-gh-sync-id: b442af60618703ab19290d042b3614984cd9a3ae
This commit is contained in:
committed by
facebook-github-bot-9
parent
ec5ca67044
commit
da153d3928
@@ -44,7 +44,7 @@ Object.keys(RemoteModules).forEach((moduleName) => {
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
let module = RemoteModules[moduleName];
|
||||
if (module && module.moduleID && global.nativeRequireModuleConfig) {
|
||||
if (module && typeof module.moduleID === 'number' && global.nativeRequireModuleConfig) {
|
||||
const json = global.nativeRequireModuleConfig(moduleName);
|
||||
const config = json && JSON.parse(json);
|
||||
module = config && BatchedBridge.processModuleConfig(config, module.moduleID);
|
||||
|
||||
Reference in New Issue
Block a user