diff --git a/lib/consolidate.js b/lib/consolidate.js index 1a71eb3..6a1199e 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -1774,10 +1774,7 @@ exports.twing.render = function(str, options, cb) { return promisify(cb, function(cb) { var engine = requires.twing || (requires.twing = require('twing')); try { - var rendTmpl = new engine.TwingLoaderNull(); - rendTmpl = new engine.TwingEnvironment(rendTmpl); - rendTmpl = rendTmpl.createTemplate(str); - rendTmpl = rendTmpl.render(options); + var rendTmpl = new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).render(options); var tmpl = cache(options) || cache(options, rendTmpl); cb(null, tmpl); } catch (err) {