diff --git a/lib/consolidate.js b/lib/consolidate.js index 795c2b2..82fa437 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -1336,7 +1336,10 @@ exports.vash.render = function(str, options, fn) { } var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options).replace(/\n$/, '')); + tmpl(options, function sealLayout(err, ctx) { + ctx.finishLayout(); + fn(null, ctx.toString().replace(/\n$/, '')); + }); } catch (err) { fn(err); }