Skip to content
Browse files

Avoid calling back twice on compile errors

  • Loading branch information...
1 parent 7b92618 commit a1cddb4040483a9f1425f03b1a1ed3b127e45e43 @adamstallard adamstallard committed Nov 30, 2013
Showing with 4 additions and 9 deletions.
  1. +4 −9 lib/modest.js
View
13 lib/modest.js
@@ -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);
}
});

0 comments on commit a1cddb4

Please sign in to comment.
Something went wrong with that request. Please try again.