Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

render without a template option

  • Loading branch information...
commit 7585790ef80d4f8c7f1e1c01ee73a40241a51fa4 1 parent cd45430
@mgutz mgutz authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/hbs.js
View
5 lib/hbs.js
@@ -266,6 +266,7 @@ var _express3 = function(filename, options, cb) {
if (layoutTemplate) {
renderIt(layoutTemplate);
}
+
// 2. Layout specified by options from render
else if (options.layout) {
var layoutFile = path.resolve(path.join(path.dirname(filename), options.layout));
@@ -274,10 +275,14 @@ var _express3 = function(filename, options, cb) {
renderIt(layoutTemplate);
});
}
+
// 3. Default layout specified when middleware was configured.
else if (defaultLayoutTemplate) {
renderIt(defaultLayoutTemplate);
}
+
+ // render without a template
+ else renderIt(null);
});
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.