Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Konstantinov committed Nov 16, 2024
1 parent fd066e6 commit 4d8854d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ export type Handle = (input: {
*/
export type HandlePageData = (input: {
event: RequestEvent;
pageData: Record<string, unknown>;
pageData: Record<string, unknown>[];
}) => MaybePromise<void | Response>;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/server/page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export async function render_page(event, page, options, manifest, state, resolve

const hookResponse = await options.hooks.handlePageData({
event,
pageData: compact(branch).map((b) => b.data)
pageData: compact(branch.map((b) => b?.data))
});
if (hookResponse) return hookResponse;

Expand Down
2 changes: 1 addition & 1 deletion packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ declare module '@sveltejs/kit' {
*/
export type HandlePageData = (input: {
event: RequestEvent;
pageData: Record<string, unknown>;
pageData: Record<string, unknown>[];
}) => MaybePromise<void | Response>;

/**
Expand Down

0 comments on commit 4d8854d

Please sign in to comment.