Skip to content

Commit

Permalink
it turns out express@1.0.0 in npm is actually master branch version.
Browse files Browse the repository at this point in the history
added extra check to copy body into locals only if it exists in options which should work with 'real' v1.0.0.
  • Loading branch information
donpark committed Dec 3, 2010
1 parent f22754a commit ff10a0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/hbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ var compile = exports.compile = function (source, options) {
var template = handlebars.compile(source);
return function (options) {
var locals = options.locals || (options.locals = {});
locals.body = options.body;
if (options.body) { // for express.js > v1.0
locals.body = options.body;
}
return template(locals, options.blockHelpers);
};
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hbs",
"description": "Express.js template engine plugin for Handlebars",
"version": "0.0.3-3",
"version": "0.0.3-4",
"homepage": "https://github.com/donpark/hbs",
"author": "Don Park <donpark@docuverse.com> (http://blog.docuverse.com)",
"directories": {
Expand Down

0 comments on commit ff10a0b

Please sign in to comment.