Skip to content

Commit

Permalink
fix: if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
pabl-o-ce committed May 14, 2024
1 parent 8a3c2e4 commit 24c8f60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-server-integration-svelte",
"version": "0.0.7",
"version": "0.0.8",
"scripts": {
"dev": "vite dev",
"build": "vite build && pnpm run package",
Expand Down
12 changes: 2 additions & 10 deletions src/lib/startServerAndCreatSvelteHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,10 @@ export function startServerAndCreateSvelteKitHandler<Context extends BaseContext
headers[key] = value;
}

if (isSvelteApiRequest(event)) {
return new Response(body.join(''), {
return new Response(body.join(''), {
headers,
status: httpGraphQLResponse.status || 200,
});
} else {
return {
status: httpGraphQLResponse.status || 200,
headers,
body: body.join(''),
};
}
});
}

return handler;
Expand Down

0 comments on commit 24c8f60

Please sign in to comment.