diff --git a/index.js b/index.js index ba8e4d4..24e9e01 100644 --- a/index.js +++ b/index.js @@ -284,11 +284,9 @@ async function fastifyView (fastify, opts) { function readCallbackParser (page, html, localOptions) { if ((type === 'ejs') && viewExt && !globalOptions.includer) { - globalOptions.includer = (originalPath, parsedPath) => { - return { - filename: parsedPath || join(templatesDir, originalPath + '.' + viewExt) - } - } + globalOptions.includer = (originalPath, parsedPath) => ({ + filename: parsedPath || join(templatesDir, originalPath + '.' + viewExt) + }) } if (localOptions) { for (const key in globalOptions) {