Skip to content

Commit

Permalink
Return proper Response object in Pages function (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar authored Jan 24, 2025
1 parent 7c28341 commit e9c3a1f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/server/functions/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,5 @@ export const onRequest: PagesFunction<Env> = async ({ request, env }) => {

// Similarly, convert Response to Cloudflare Response type by adding
// webSocket property
const response = collectRequestHandler(
_request,
env,
) as unknown as CfResponse;

return {
...response,
webSocket: null,
} as CfResponse;
return collectRequestHandler(_request, env) as unknown as CfResponse;
};

0 comments on commit e9c3a1f

Please sign in to comment.