Fix for failing React Native test on iOS
This commit is contained in:
parent
bc4bda876c
commit
73cfca7d81
|
@ -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!');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue