From 73cfca7d812cbabaecfcd59850845b05f143c2e3 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Mon, 18 Apr 2016 16:06:59 -0700 Subject: [PATCH] Fix for failing React Native test on iOS --- lib/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index b8aa002c..ec2a0e6b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -30,7 +30,9 @@ if (typeof Realm != 'undefined') { realmConstructor = require('./browser').default; // (exported as ES6 module) // eslint-disable-next-line } else if (typeof process == 'object' && ('' + process) == '[object process]') { - realmConstructor = require('bindings')('realm').Realm; + // Prevent React Native packager from seeing this module. + const bindings = 'bindings'; + realmConstructor = require(bindings)('realm').Realm; } else { throw new Error('Missing Realm constructor - please ensure RealmReact framework is included!'); }