Permalink
Browse files

follow wool change on template module

  • Loading branch information...
1 parent a84018b commit 1707e7b5294fb29853ec4d8518f1bcee19cc5fd3 @nicocube committed Aug 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/llama.js
View
@@ -17,7 +17,7 @@ module.exports = function (options) {
template_regex = options.regex ? new RegExp(options.regex) : template.regex
dispatcher = dispatch.chain([
dispatch.rule({method: static_methods, url: function(url) {return options.static.some(function(x) {return url.indexOf(x)==0})}}, static.build(0,options.folder)),
- dispatch.rule({method: static_methods, url: template_regex}, template.build(options.template_folder || options.folder, options.data_folder || options.folder, template_regex, options.str_to_obj_inject)),
+ dispatch.rule({method: static_methods, url: template_regex}, template.build(options.template_folder || options.folder, options.data_folder || options.folder, template_regex, 'str_to_obj_inject' in options ? options.str_to_obj_inject(knit): undefined)),
dispatch.rule({method: filter.not(static_methods)}, function(req,res) { http_status(405)(res); }),
dispatch.rule(true, function(req,res) { http_status(404)(res); })
])

0 comments on commit 1707e7b

Please sign in to comment.