removeSignedPrekey: Be resilient to delete returning nothing (#1769)
This commit is contained in:
parent
0a2651c0a7
commit
f0ec75eef4
1 changed files with 7 additions and 4 deletions
|
@ -267,10 +267,13 @@
|
||||||
},
|
},
|
||||||
removeSignedPreKey: function(keyId) {
|
removeSignedPreKey: function(keyId) {
|
||||||
var prekey = new SignedPreKey({id: keyId});
|
var prekey = new SignedPreKey({id: keyId});
|
||||||
return new Promise(function(resolve) {
|
return new Promise(function(resolve, reject) {
|
||||||
prekey.destroy().then(function() {
|
var deferred = prekey.destroy();
|
||||||
resolve();
|
if (!deferred) {
|
||||||
});
|
return resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
deferred.then(resolve, reject);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue