mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
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:
committed by
facebook-github-bot-6
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 {
|
||||
|
||||
Reference in New Issue
Block a user