diff --git a/lib/template.js b/lib/template.js index e30074db0..29ce0a9c5 100644 --- a/lib/template.js +++ b/lib/template.js @@ -128,7 +128,8 @@ TemplateEngine.prototype.bindContext = function(func) { return function() { var ctx = { ctx: this.ctx, - book: that.book + book: that.book, + generator: that.book.options.generator }; return func.apply(ctx, arguments);