From 646244753d2f7474935b9475d89b4fba3b0a9a8a Mon Sep 17 00:00:00 2001 From: eikaramba Date: Thu, 29 Dec 2016 04:02:19 +0100 Subject: [PATCH] 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 https://github.com/marko-js/marko/pull/450. This change is compatible with the current stable public version. --- lib/consolidate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/consolidate.js b/lib/consolidate.js index 8a06431..7efb6f8 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -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); } @@ -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); }