mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-10 22:36:01 +00:00
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…
x
Reference in New Issue
Block a user