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:
Jan Kassens 2015-11-03 17:09:35 -08:00 committed by facebook-github-bot-6
parent 5ed8c6732e
commit 2519d25992
1 changed files with 1 additions and 1 deletions

View File

@ -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 {