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) => { (error) => {
if (error) { if (error) {
setTimeout(() => { reject(error); }, 1); reject(error);
} }
else { else {
try { try {
let syncedRealm = new realmConstructor(config); let syncedRealm = new realmConstructor(config);
//FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented //FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented
setTimeout(() => { resolve(syncedRealm); }, 1); resolve(syncedRealm);
} catch (e) { } catch (e) {
reject(e); reject(e);
} }