Browse files

change to using fat-arrow for __express method

Previously, apps were crashing with 500 TypeError: Object #<View> has no method '_readFile'. Artifact of refactor, where __express function was moved to a method on the 'HulkHogan' class. Since application authors hand over __express method to the framework, the 'this' value was being lost. Changing to a fat-arrow binds this to the HulkHogan instance, and a reference to @_readfile is restored.
  • Loading branch information...
christopherscott committed Jul 6, 2012
1 parent 49631d1 commit fb42463932d32092bca190c5c90b7a7cac76a75f
Showing with 1 addition and 1 deletion.
  1. +1 −1
@@ -65,7 +65,7 @@ class HulkHogan
return ->
return compiled.render options, partials
- __express : (filename, options, callback) ->
+ __express : (filename, options, callback) =>
# add support for Express 3.x templating scheme
# in Express use like this:

0 comments on commit fb42463

Please sign in to comment.