Skip to content

Commit

Permalink
Fixed Twing Support
Browse files Browse the repository at this point in the history
  • Loading branch information
noel-schenk committed Sep 19, 2019
1 parent fe15dec commit 394d864
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ exports.twing.render = function(str, options, cb) {
return promisify(cb, function(cb) {
var engine = requires.twing || (requires.twing = require('twing'));
try {
let rendTmpl = new engine.TwingEnvironment(new engine.TwingLoaderNull).createTemplate(str).render(options);
let rendTmpl = new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).render(options);
let tmpl = cache(options) || cache(options, rendTmpl);
cb(null, tmpl);
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion test/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ require('./shared').test('razor');
require('./shared').test('squirrelly');
require('./shared/partials').test('squirrelly');
require('./shared/helpers').test('squirrelly');
require('./shared').test('twing');
require('./shared').test('twing');
1 change: 1 addition & 0 deletions test/fixtures/twing/user.twing
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>{{ user.name }}</p>

0 comments on commit 394d864

Please sign in to comment.