Skip to content

Commit 6462447

Browse files
authored
Change Marko Implementation to support v4
Marko changed its implementation and thus "The render callback will no longer receive a string in Marko v4. Use `renderToString(data, callback)` instead" See marko-js/marko#450. This change is compatible with the current stable public version.
1 parent 894b0de commit 6462447

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/consolidate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ exports.marko = function(path, options, fn){
14521452

14531453
try {
14541454
var tmpl = cache(options) || cache(options, engine.load(path, options));
1455-
tmpl.render(options, fn)
1455+
tmpl.renderToString(options, fn)
14561456
} catch (err) {
14571457
fn(err);
14581458
}
@@ -1470,7 +1470,7 @@ exports.marko.render = function(str, options, fn) {
14701470

14711471
try {
14721472
var tmpl = cache(options) || cache(options, engine.load('string.marko', str, options));
1473-
tmpl.render(options, fn)
1473+
tmpl.renderToString(options, fn)
14741474
} catch (err) {
14751475
fn(err);
14761476
}

0 commit comments

Comments
 (0)