Skip to content

Commit

Permalink
Fix bug that returns function instead errror then caching is disable
Browse files Browse the repository at this point in the history
  • Loading branch information
akaspin committed May 25, 2010
1 parent 4c93c31 commit 52da936
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function compile(origin, options, callback) {
callback(err);
return;
}
callback(fn);
callback(undefined, fn);
});
}
});
Expand Down Expand Up @@ -94,7 +94,10 @@ exports.setFilter = setFilter;
*/
function make(origin, options, callback){
parser.parse(origin, options, function(err, stream) {
if (err) return callback(err);
if (err) {
callback(err);
return;
}

compiler.compile(stream, function(fn) {
callback(undefined, fn);
Expand Down

0 comments on commit 52da936

Please sign in to comment.