remove setTimeout to repro issue 1255

This commit is contained in:
Ashwin Phatak 2017-10-25 12:28:09 +05:30
parent 2df308ae64
commit 356d295e5f
1 changed files with 2 additions and 2 deletions

View File

@ -71,13 +71,13 @@ module.exports = function(realmConstructor) {
},
(error) => {
if (error) {
setTimeout(() => { reject(error); }, 1);
reject(error);
}
else {
try {
let syncedRealm = new realmConstructor(config);
//FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented
setTimeout(() => { resolve(syncedRealm); }, 1);
resolve(syncedRealm);
} catch (e) {
reject(e);
}