Merge pull request #1146 from realm/ni/open-async
Don’t invoke openAsync callback twice
This commit is contained in:
commit
c090cd9700
|
@ -1,3 +1,12 @@
|
|||
vNext (TBD)
|
||||
=============================================================
|
||||
### Breaking changes
|
||||
* `Realm.openAsync` will no longer open the realm if an error has occured. Previously this resulted in the callback being invoked twice - once with an error and a second time - with the synchronously opened Realm.
|
||||
|
||||
### Enhancements
|
||||
|
||||
### Bug fixes
|
||||
|
||||
1.10.0 Release notes (2017-7-12)
|
||||
=============================================================
|
||||
### Breaking changes
|
||||
|
|
|
@ -48,7 +48,7 @@ module.exports = function(realmConstructor) {
|
|||
if (error) {
|
||||
reject(error);
|
||||
}
|
||||
|
||||
else {
|
||||
try {
|
||||
let syncedRealm = new this(config);
|
||||
//FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented
|
||||
|
@ -56,6 +56,7 @@ module.exports = function(realmConstructor) {
|
|||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -65,7 +66,7 @@ module.exports = function(realmConstructor) {
|
|||
if (error) {
|
||||
callback(error);
|
||||
}
|
||||
|
||||
else {
|
||||
try {
|
||||
let syncedRealm = new this(config);
|
||||
//FIXME: RN hangs here. Remove when node's makeCallback alternative is implemented
|
||||
|
@ -73,6 +74,7 @@ module.exports = function(realmConstructor) {
|
|||
} catch (e) {
|
||||
callback(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue