diff --git a/lib/index.js b/lib/index.js index 46ad49c6..f8cde9e4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -6,6 +6,8 @@ if (typeof Realm != 'undefined') { module.exports = Realm; // eslint-disable-line no-undef -} else { +} else if (navigator.userAgent) { module.exports = require('./realm'); +} else { + throw new Error('Missing Realm constructor - please ensure RealmReact framework is included!'); }