Fix undefined var exception
Summary: This check to see if `require` exists was bad as it throws an error for an undefined reference in case it doesn't exist. Closes https://github.com/facebook/react-native/pull/3845 Reviewed By: svcscm Differential Revision: D2613368 Pulled By: martinbigio fb-gh-sync-id: 7b1d0f38e4af9bce81356a613d6105f2c00c7ed7
This commit is contained in:
parent
5ed8c6732e
commit
2519d25992
|
@ -21,7 +21,7 @@ var messageHandlers = {
|
|||
'executeJSCall': function(message, sendReply) {
|
||||
var returnValue = [[], [], [], [], []];
|
||||
try {
|
||||
if (require) {
|
||||
if (typeof require === 'function') {
|
||||
returnValue = require(message.moduleName)[message.moduleMethod].apply(null, message.arguments);
|
||||
}
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue