Skip to content

Commit

Permalink
Avoid calling back twice on compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstallard committed Dec 1, 2013
1 parent 7b92618 commit a1cddb4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/modest.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,10 @@ function compile(params){
});

async.parallel(parallel, function(err){
if (err) {
if(params.callback){
params.callback(err);
} else {
throw(err);
}
}
if(params.callback){
params.callback();
if (params.callback) {
params.callback(err);
} else if (err) {
throw(err);
}
});

Expand Down

0 comments on commit a1cddb4

Please sign in to comment.