Skip to content

Commit

Permalink
Merge pull request #37 from CauldronDevelopmentLLC/master
Browse files Browse the repository at this point in the history
fix: synchronous rendering API call
  • Loading branch information
RobLoach committed Oct 16, 2020
2 parents 582f0e1 + a5aeb24 commit ee240f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exports.render = function (str, options, locals) {
'node', [browserifyPath, 'text', stringifyForCli(str), stringifyForCli(options)]
)

return o.output.toString()
return o.stdout.toString()
}

exports.renderAsync = function (str, options, locals) {
Expand Down Expand Up @@ -67,5 +67,5 @@ exports.renderAsync = function (str, options, locals) {
}

function stringifyForCli(object) {
return JSON.stringify(JSON.stringify(object || {}))
return JSON.stringify(object || {})
}

0 comments on commit ee240f2

Please sign in to comment.