Skip to content

Commit

Permalink
chore(app): fix localFetch type
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 18, 2023
1 parent 553e453 commit 5f3b287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 0 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/runtime/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@ function createNitroApp(): NitroApp {
// Create local fetch callers
const localCall = createCall(toNodeListener(h3App) as any);
const _localFetch = createLocalFetch(localCall, globalThis.fetch);
const localFetch = (...args: Parameters<typeof _localFetch>) => {
return _localFetch(...args).then((response) =>
const localFetch: typeof fetch = (input, init) =>
_localFetch(input, init).then((response) =>
normalizeFetchResponse(response)
);
};
const $fetch = createFetch({
fetch: localFetch,
Headers,
Expand Down

0 comments on commit 5f3b287

Please sign in to comment.