handleDataMessage: Remove if(confirm) checks, add try/catch

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-08-04 11:50:49 -07:00
parent 832b343031
commit 7e0bd82bd3

View file

@ -510,22 +510,22 @@
console.log('done with handleDataMessage', message.idForLogging());
if (confirm) {
confirm();
}
confirm();
return resolve();
}
catch (e) {
handleError(e);
}
}, function(error) {
console.log('handleDataMessage: Message', message.idForLogging(), 'was deleted');
try {
console.log('handleDataMessage: Message', message.idForLogging(), 'was deleted');
if (confirm) {
confirm();
return resolve();
}
catch (e) {
handleError(e);
}
return resolve();
});
}, handleError);
}, handleError);