Skip to content

Commit

Permalink
chore: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 30, 2023
1 parent b77f082 commit 50e1a8f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/prerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,13 @@ export async function prerender(nitro: Nitro) {
const _route: PrerenderGenerateRoute = { route };

// Fetch the route
const encodedRoute = encodeURI(route)
const res = await (localFetch(withBase(encodedRoute, nitro.options.baseURL), {
headers: { "x-nitro-prerender": encodedRoute },
}) as ReturnType<typeof fetch>);
const encodedRoute = encodeURI(route);
const res = await (localFetch(
withBase(encodedRoute, nitro.options.baseURL),
{
headers: { "x-nitro-prerender": encodedRoute },
}
) as ReturnType<typeof fetch>);
_route.data = await res.arrayBuffer();
Object.defineProperty(_route, "contents", {
get: () => {
Expand Down

0 comments on commit 50e1a8f

Please sign in to comment.