Log nunjucks parsing errors for debugging.

This commit is contained in:
Michael Teeuw
2017-10-18 11:55:02 +02:00
committed by GitHub
parent 8b009b7ee9
commit 79a662fb93

View File

@@ -89,6 +89,10 @@ var Module = Class.extend({
if (/^.*(\.html)$/.test(template)) { if (/^.*(\.html)$/.test(template)) {
// the template is a filename // the template is a filename
this.nunjucksEnvironment().render(template, templateData, function (err, res) { this.nunjucksEnvironment().render(template, templateData, function (err, res) {
if (err) {
Log.error(err)
}
// The inner content of the div will be set after the template is received. // The inner content of the div will be set after the template is received.
// This isn't the most optimal way, but since it's near instant // This isn't the most optimal way, but since it's near instant
// it probably won't be an issue. // it probably won't be an issue.