diff options
-rw-r--r-- | lib/template/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/template/index.js b/lib/template/index.js index 215ebcd..a2d00b5 100644 --- a/lib/template/index.js +++ b/lib/template/index.js @@ -199,7 +199,7 @@ TemplateEngine.prototype.addBlock = function(name, block) { lastBlockArgs = parser.parseSignature(null, true); parser.advanceAfterBlockEnd(lastBlockName); } - } while (lastBlockName == block.end) + } while (lastBlockName != block.end) parser.advanceAfterBlockEnd(); @@ -343,6 +343,7 @@ TemplateEngine.prototype.render = function(content, context, options) { options = _.defaults(options || {}, { path: null }); + var filename = options.path; // Setup path and type if (options.path) { @@ -355,7 +356,7 @@ TemplateEngine.prototype.render = function(content, context, options) { return Promise.nfcall(this.env.renderString.bind(this.env), content, context, options) .fail(function(err) { throw error.TemplateError(err, { - filename: options.path + filename: filename || '<inline>' }); }); }; |