mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-03 02:05:21 +00:00
Don’t invoke openAsync callback twice
This commit is contained in:
parent
22a086859f
commit
bd10a6d8e0
@ -65,13 +65,14 @@ module.exports = function(realmConstructor) {
|
||||
if (error) {
|
||||
callback(error);
|
||||
}
|
||||
|
||||
try {
|
||||
let syncedRealm = new this(config);
|
||||
//FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented
|
||||
setTimeout(() => { callback(null, syncedRealm); }, 1);
|
||||
} catch (e) {
|
||||
callback(e);
|
||||
else {
|
||||
try {
|
||||
let syncedRealm = new this(config);
|
||||
//FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented
|
||||
setTimeout(() => { callback(null, syncedRealm); }, 1);
|
||||
} catch (e) {
|
||||
callback(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user