1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-02 03:59:29 +00:00

Allow handlebars to use prototype properties and methods

This commit is contained in:
2022-04-18 12:54:23 +00:00
parent 6406cd5a5c
commit d965405c8b

8
app.js
View File

@@ -61,8 +61,12 @@ async function main() {
'hbs', 'hbs',
engine({ engine({
extname: '.hbs', extname: '.hbs',
helpers: hbsHelpers helpers: hbsHelpers,
}) runtimeOptions: {
allowProtoPropertiesByDefault: true,
allowProtoMethodsByDefault: true
}
}),
); );
app.set('view engine', 'hbs'); app.set('view engine', 'hbs');
app.set('views', path.join(__dirname, 'views')); app.set('views', path.join(__dirname, 'views'));