diff --git a/core/server/helpers/template.js b/core/server/helpers/template.js index 3dcdd9a9d8..baba6a9637 100644 --- a/core/server/helpers/template.js +++ b/core/server/helpers/template.js @@ -17,8 +17,7 @@ templates.execute = function (name, context) { // If the partial view is not compiled, it compiles and saves in handlebars if (typeof partial === 'string') { - partial = hbs.handlebars.compile(partial); - hbs.handlebars.partials[name] = partial; + hbs.registerPartial(partial); } return new hbs.handlebars.SafeString(partial(context)); diff --git a/package.json b/package.json index a488fb3e85..c2507822f1 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "connect-slashes": "1.2.0", "downsize": "0.0.4", "express": "3.4.6", - "express-hbs": "0.5.2", + "express-hbs": "0.7.6", "fs-extra": "0.8.1", "knex": "0.5.0", "moment": "2.4.0",