Skip to content

Commit

Permalink
perf(index): immediately return instead of using temp var (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Jan 10, 2025
1 parent af998e5 commit cfedf2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,7 @@ async function fastifyView (fastify, opts) {
const template = await getTemplate(page)

if (prod) {
const html = template(data, options)
return html
return template(data, options)
} else {
const partialsObject = await getPartials(type, { partials: globalOptions.partials || {}, requestedPath })

Expand Down

0 comments on commit cfedf2f

Please sign in to comment.