Error message when RealmReact framework is missing

Fixes #190
This commit is contained in:
Scott Kyle 2016-01-07 15:18:27 -08:00
parent 381dbbe7ba
commit 334e646d7b
1 changed files with 3 additions and 1 deletions

View File

@ -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!');
}