From fcf6e76804d897606ceeb4578f7ec4c209490429 Mon Sep 17 00:00:00 2001 From: Jim LAURIE Date: Fri, 27 Sep 2019 10:07:53 +0200 Subject: [PATCH] Fix default config usage ejs --- packages/strapi-hook-ejs/lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/strapi-hook-ejs/lib/index.js b/packages/strapi-hook-ejs/lib/index.js index a6295c8323..13586e6771 100644 --- a/packages/strapi-hook-ejs/lib/index.js +++ b/packages/strapi-hook-ejs/lib/index.js @@ -33,13 +33,13 @@ module.exports = function(strapi) { * Initialize the hook */ - initialize: () => { + initialize () { // Force cache mode in production if (strapi.config.environment === 'production') { strapi.config.hook.settings.ejs.cache = true; } - render(strapi.app, strapi.config.hook.settings.ejs); + render(strapi.app, Object.assign(this.defaults, strapi.config.hook.settings.ejs)); strapi.app.context.render = co.wrap(strapi.app.context.render); },