Add a fix for RN hang with promises
This commit is contained in:
parent
6c3dc8258a
commit
6be9ad5e35
|
@ -50,7 +50,7 @@ module.exports = function(realmConstructor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let syncedRealm = new realmConstructor(config);
|
let syncedRealm = new realmConstructor(config);
|
||||||
resolve(syncedRealm);
|
setTimeout(_ => { resolve(syncedRealm); }, 1); //FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -64,7 +64,6 @@ module.exports = function(realmConstructor) {
|
||||||
let syncedRealm = new realmConstructor(config);
|
let syncedRealm = new realmConstructor(config);
|
||||||
callback(null, syncedRealm);
|
callback(null, syncedRealm);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue