Skip to content

Commit

Permalink
Fix empty templates for real this time.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Murdoch committed Jun 12, 2012
1 parent f4d5ff3 commit def61bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/razor.js
Expand Up @@ -73,10 +73,13 @@ exports.compile = function( str, options ) {
razor.JSON = JSON;

// add a RenderBody function
if( locals && locals.body ){
if( locals && locals.body !== undefined ){
var body = Html.Raw( locals.body );
razor.RenderBody = function (){ return body; };
}
else{
razor.RenderBody = function(){ return ""; };
}

// use node-proxy
var Proxy = require('node-proxy');
Expand Down

0 comments on commit def61bf

Please sign in to comment.