Skip to content

Commit

Permalink
Memoize lazy module configs
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D3293010

fbshipit-source-id: feab7bb0a1f8990baea9c0aca8c9c3cccbcb04e8
  • Loading branch information
lexs authored and Facebook Github Bot 3 committed May 16, 2016
1 parent ccef1b2 commit 9a899be
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ Object.keys(RemoteModules).forEach((moduleName) => {
module = config && BatchedBridge.processModuleConfig(config, module.moduleID);
RemoteModules[moduleName] = module;
}
Object.defineProperty(NativeModules, moduleName, {
configurable: true,
enumerable: true,
value: module,
});
return module;
},
});
Expand Down

0 comments on commit 9a899be

Please sign in to comment.