Skip to content

Commit

Permalink
refactor(index): return directly in arrow function (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Jan 10, 2025
1 parent 7eccc3b commit af998e5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit af998e5

Please sign in to comment.