Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Apr 1, 2020
1 parent 07d4acc commit 3cc3455
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
unreleased
==========

* deps: [email protected].4
* deps: [email protected].3

4.1.0 / 2020-01-14
==================
Expand Down
10 changes: 9 additions & 1 deletion lib/hbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,16 @@ function middleware(filename, options, cb) {
// if we need a layout, we will look for one matching out extension
var extension = path.extname(filename);

// Default handlebars runtime options
var handlebarsOpts = {
allowProtoMethodsByDefault: true,
allowProtoPropertiesByDefault: true
}

// If passing the locals as data, create the handlebars options object now
var handlebarsOpts = (self.__localsAsData) ? { data: options._locals } : undefined;
if (self.__localsAsData) {
handlebarsOpts.data = options._locals
}

// render the original file
// cb(err, str)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"repository": "pillarjs/hbs",
"main": "lib/hbs.js",
"dependencies": {
"handlebars": "4.5.3",
"handlebars": "4.7.3",
"walk": "2.3.14"
},
"devDependencies": {
Expand Down

0 comments on commit 3cc3455

Please sign in to comment.