Skip to content

Commit 77c49a0

Browse files
committed
support layouts in vash
1 parent ebdeda5 commit 77c49a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/consolidate.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,10 @@ exports.vash.render = function(str, options, fn) {
13361336
}
13371337

13381338
var tmpl = cache(options) || cache(options, engine.compile(str, options));
1339-
fn(null, tmpl(options).replace(/\n$/, ''));
1339+
tmpl(options, function sealLayout(err, ctx) {
1340+
ctx.finishLayout();
1341+
fn(null, ctx.toString().replace(/\n$/, ''));
1342+
});
13401343
} catch (err) {
13411344
fn(err);
13421345
}

0 commit comments

Comments
 (0)