Skip to content

Commit af998e5

Browse files
authored
refactor(index): return directly in arrow function (#455)
1 parent 7eccc3b commit af998e5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,9 @@ async function fastifyView (fastify, opts) {
284284

285285
function readCallbackParser (page, html, localOptions) {
286286
if ((type === 'ejs') && viewExt && !globalOptions.includer) {
287-
globalOptions.includer = (originalPath, parsedPath) => {
288-
return {
289-
filename: parsedPath || join(templatesDir, originalPath + '.' + viewExt)
290-
}
291-
}
287+
globalOptions.includer = (originalPath, parsedPath) => ({
288+
filename: parsedPath || join(templatesDir, originalPath + '.' + viewExt)
289+
})
292290
}
293291
if (localOptions) {
294292
for (const key in globalOptions) {

0 commit comments

Comments
 (0)