This commit is contained in:
Barış Soner Uşaklı
2017-10-11 16:51:52 -04:00
parent 91f385dc94
commit 645410131d
2 changed files with 11 additions and 10 deletions

View File

@@ -92,18 +92,19 @@ function renderWidget(widget, uid, options, callback) {
}
if (widget.data.container && widget.data.container.match('{body}')) {
translator.translate(widget.data.title, function (title) {
Benchpress.compileParse(widget.data.container, {
title: title,
body: html,
}, function (err, html) {
next(err, { html: html });
});
});
Benchpress.compileParse(widget.data.container, {
title: widget.data.title,
body: html,
}, next);
} else {
next(null, { html: html });
next(null, html);
}
},
function (html, next) {
translator.translate(html, function (translatedHtml) {
next(null, { html: translatedHtml });
});
},
], callback);
}