Eliminate all console errors during test run

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-05-18 10:42:20 -07:00
parent f6c62e4822
commit 3cfac58d78
5 changed files with 38 additions and 16 deletions

View file

@ -136,15 +136,16 @@
removePreKey: function(keyId) {
var prekey = new PreKey({id: keyId});
new Promise(function(resolve) {
getAccountManager().refreshPreKeys().then(resolve);
});
return new Promise(function(resolve) {
prekey.destroy().then(function() {
resolve();
});
});
return Promise.all([
new Promise(function(resolve) {
getAccountManager().refreshPreKeys().then(resolve);
}),
new Promise(function(resolve) {
prekey.destroy().then(function() {
resolve();
});
})
]);
},
/* Returns a signed keypair object or undefined */

View file

@ -9,8 +9,10 @@
initialize: function() {
this.$el.hide();
var renderIntervalHandle = setInterval(this.update.bind(this), 5000);
extension.windows.onClosed(function () { clearInterval(renderIntervalHandle); });
this.renderIntervalHandle = setInterval(this.update.bind(this), 5000);
extension.windows.onClosed(function () {
clearInterval(this.renderIntervalHandle);
}.bind(this));
setTimeout(this.finishConnectingGracePeriod.bind(this), 5000);