diff --git a/lib/extensions.js b/lib/extensions.js index 44dfd780..6d08f1df 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -48,13 +48,14 @@ module.exports = function(realmConstructor) { if (error) { reject(error); } - - try { - let syncedRealm = new this(config); - //FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented - setTimeout(() => { resolve(syncedRealm); }, 1); - } catch (e) { - reject(e); + else { + try { + let syncedRealm = new this(config); + //FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented + setTimeout(() => { resolve(syncedRealm); }, 1); + } catch (e) { + reject(e); + } } }); });