fix crashing issue
This commit is contained in:
parent
04d92b8781
commit
6c4f78446b
1 changed files with 17 additions and 16 deletions
|
@ -43,7 +43,6 @@ exports.padUpdate = function (hook_name, _pad) {
|
||||||
exports.notifyBegin = function(padId){
|
exports.notifyBegin = function(padId){
|
||||||
console.warn("Getting "+padId);
|
console.warn("Getting "+padId);
|
||||||
db.get("emailSubscription:" + padId, function(err, recipients){ // get everyone we need to email
|
db.get("emailSubscription:" + padId, function(err, recipients){ // get everyone we need to email
|
||||||
console.warn(recipients);
|
|
||||||
if(recipients){
|
if(recipients){
|
||||||
async.forEach(Object.keys(recipients), function(recipient, cb){
|
async.forEach(Object.keys(recipients), function(recipient, cb){
|
||||||
console.warn("Emailing "+recipient +" about a new begin update");
|
console.warn("Emailing "+recipient +" about a new begin update");
|
||||||
|
@ -69,6 +68,7 @@ exports.notifyEnd = function(padId){
|
||||||
var changesToPad = "Functionality does not exist";
|
var changesToPad = "Functionality does not exist";
|
||||||
|
|
||||||
db.get("emailSubscription:" + padId, function(err, recipients){ // get everyone we need to email
|
db.get("emailSubscription:" + padId, function(err, recipients){ // get everyone we need to email
|
||||||
|
if(recipients){
|
||||||
async.forEach(Object.keys(recipients), function(recipient, cb){
|
async.forEach(Object.keys(recipients), function(recipient, cb){
|
||||||
console.debug("Emailing "+recipient +" about a new begin update");
|
console.debug("Emailing "+recipient +" about a new begin update");
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ exports.notifyEnd = function(padId){
|
||||||
function(err){
|
function(err){
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue