call cb even if email service is not defined

This commit is contained in:
Ivan Socolsky 2015-05-19 14:47:36 -03:00
parent fcd410e6b1
commit f58f7eb7e4
1 changed files with 3 additions and 3 deletions

View File

@ -133,9 +133,9 @@ BlockchainMonitor.prototype._createNotification = function(walletId, txid, addre
self.storage.storeNotification(walletId, notification, function() {
self.messageBroker.send(notification)
if (self.emailService) {
self.emailService.sendEmail(notification, function() {
if (cb) return cb();
});
self.emailService.sendEmail(notification, cb);
} else {
return cb();
}
});
};