Skip to content

Commit

Permalink
api: fix asyncify api
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Jan 15, 2013
1 parent dc1ed5c commit 77afbc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/spoon/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ function patch(ast, decl, callback) {
enter: function(ast) {
if (ast.type === 'Literal') {
if (ast.value === decl && fn) {
body = callback(fn).body;
body = {
type: 'BlockStatement',
body: callback(fn).body
};
}
return;
} else if (ast.type === 'FunctionDeclaration' ||
Expand Down

0 comments on commit 77afbc8

Please sign in to comment.