Fix default config usage ejs

This commit is contained in:
Jim LAURIE 2019-09-27 10:07:53 +02:00 committed by GitHub
parent 93ee900a14
commit fcf6e76804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
},