Skip to content

Commit

Permalink
fix(htmx): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
galvez committed Feb 19, 2024
1 parent fb838ba commit ab85ea6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions packages/fastify-htmx/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function prepareClient(clientModule, scope, config) {
if (route.decorateReply) {
for (const prop of route.decorateReply) {
!scope.hasReplyDecorator(prop) && scope.decorateReply(prop, null)
}
}
}
// Pregenerate prefetching <head> elements
const { css, svg, js } = await findClientImports(
Expand Down Expand Up @@ -96,14 +96,27 @@ export function createRouteHandler({ client, route }, scope, config) {
return async (req, reply) => {
req.route = route
reply.html({
head: await renderHead(client, route, { app: scope, req, reply, client, route }),
head: await renderHead(client, route, {
app: scope,
req,
reply,
client,
route,
}),
element: renderToStream((rid) =>
client.root({
app: scope,
req,
reply,
rid,
children: route.default({ app: scope, client, route, req, reply, rid }),
children: route.default({
app: scope,
client,
route,
req,
reply,
rid,
}),
}),
),
})
Expand Down

0 comments on commit ab85ea6

Please sign in to comment.