Skip to content

Commit fb9ffce

Browse files
committed
problem is in node compatibility
1 parent 9b36280 commit fb9ffce

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/consolidate.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1774,10 +1774,7 @@ exports.twing.render = function(str, options, cb) {
17741774
return promisify(cb, function(cb) {
17751775
var engine = requires.twing || (requires.twing = require('twing'));
17761776
try {
1777-
var rendTmpl = new engine.TwingLoaderNull();
1778-
rendTmpl = new engine.TwingEnvironment(rendTmpl);
1779-
rendTmpl = rendTmpl.createTemplate(str);
1780-
rendTmpl = rendTmpl.render(options);
1777+
var rendTmpl = new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).render(options);
17811778
var tmpl = cache(options) || cache(options, rendTmpl);
17821779
cb(null, tmpl);
17831780
} catch (err) {

0 commit comments

Comments
 (0)