Skip to content

Commit

Permalink
Change Marko Implementation to support v4
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eikaramba authored Dec 29, 2016
1 parent 894b0de commit 6462447
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ exports.marko = function(path, options, fn){

try {
var tmpl = cache(options) || cache(options, engine.load(path, options));
tmpl.render(options, fn)
tmpl.renderToString(options, fn)
} catch (err) {
fn(err);
}
Expand All @@ -1470,7 +1470,7 @@ exports.marko.render = function(str, options, fn) {

try {
var tmpl = cache(options) || cache(options, engine.load('string.marko', str, options));
tmpl.render(options, fn)
tmpl.renderToString(options, fn)
} catch (err) {
fn(err);
}
Expand Down

0 comments on commit 6462447

Please sign in to comment.