Skip to content

Commit

Permalink
Merge branch 'eikaramba-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
doowb committed Sep 18, 2017
2 parents 87a894b + e32e373 commit 17b3b8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,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 @@ -1626,10 +1626,11 @@ exports.marko.render = function(str, options, fn) {
return promisify(fn, function (fn) {
var engine = requires.marko || (requires.marko = require('marko'));
options.writeToDisk = !!options.cache;
options.filename = options.filename || 'string.marko';

try {
var tmpl = cache(options) || cache(options, engine.load('string.marko', str, options));
tmpl.render(options, fn)
var tmpl = cache(options) || cache(options, engine.load(options.filename, str, options));
tmpl.renderToString(options, fn)
} catch (err) {
fn(err);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"atpl": ">=0.7.6",
"babel-core": "^6.7.6",
"babel-preset-react": "^6.5.0",
"bracket-template": "^1.0.3",
"bracket-template": "^1.1.4",
"coffee-script": "^1.11.1",
"dot": "^1.0.1",
"dust": "^0.3.0",
Expand Down

0 comments on commit 17b3b8f

Please sign in to comment.