Skip to content

Commit

Permalink
add merge callback and missing err param for merge callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabehopper committed Oct 26, 2012
1 parent 9c987a9 commit 3bb9f9a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions index.js
Expand Up @@ -63,6 +63,7 @@

return result[key] = value;
}
return value;
});

return batch.end(function (err) {
Expand All @@ -84,7 +85,7 @@
}

if (content) {
return merge(result, content, function (result) {
return merge(result, content, function (err, result) {
if (err) {
return cb(err, result);
}
Expand All @@ -97,7 +98,13 @@
});
}

return loadConfigs(args, merge(result, config), cb);
return merge(result, config, function (err, result) {
if (err) {
return cb(err, result);
}

return loadConfigs(args, result, cb);
});
}

module.exports = function () {
Expand Down Expand Up @@ -133,4 +140,4 @@

return value;
};
})(module);
})(module);

0 comments on commit 3bb9f9a

Please sign in to comment.