Fix unresolved promise in removeSession

Previously if there was no session to remove, the promise returned from
removeSession would never resolve, potentially blocking sending for that
recipient until restart.

// FREEBIE
pull/749/head
lilia 9 years ago
parent e4b9c51f88
commit 527e7878a8

@ -251,7 +251,7 @@
var session = new Session({id: encodedNumber}); var session = new Session({id: encodedNumber});
session.fetch().then(function() { session.fetch().then(function() {
session.destroy().then(resolve); session.destroy().then(resolve);
}); }).fail(resolve);
}); });
}, },
removeAllSessions: function(number) { removeAllSessions: function(number) {

Loading…
Cancel
Save