Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/express-handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ ExpressHandlebars.prototype.getTemplate = function (filePath, options) {
return this._precompileTemplate(file, this.compilerOptions);
}

return this._compileTemplate(file, this.compilerOptions);
return this._compileTemplate(file, this.compilerOptions, filePath);
}.bind(this));

return template.catch(function (err) {
Expand Down Expand Up @@ -235,7 +235,8 @@ ExpressHandlebars.prototype.renderView = function (viewPath, options, callback)

// -- Protected Hooks ----------------------------------------------------------

ExpressHandlebars.prototype._compileTemplate = function (template, options) {
ExpressHandlebars.prototype._compileTemplate = function (template, options, filePath) {
// filePath is an arg incase it's useful - maybe for non-handlebar stuff.
return this.handlebars.compile(template, options);
};

Expand Down