don't require node analytics for rn

This commit is contained in:
Ari Lazier 2016-11-21 17:47:17 -08:00
parent 537e3824be
commit acae0aaf4f

View File

@ -22,6 +22,7 @@ function node_require(module) {
return require(module);
}
// If process is defined, we're running in node.
function isNode() {
return typeof process == 'object' && (('' + process) == '[object process]' || typeof jest == 'object')
}
@ -32,8 +33,7 @@ function isNode() {
var realmConstructor;
if (isNode()) {
// If process is defined, we're running in node.
require('./submit-analytics')('Run');
node_require('./submit-analytics')('Run');
// Prevent React Native packager from seeing this module.
var binary = node_require('node-pre-gyp');