Skip to content

Commit 40d5a27

Browse files
authored
fix onBeforeResponse (#2053)
1 parent 9c1c936 commit 40d5a27

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/eager-wings-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/start": minor
3+
---
4+
5+
fix onBeforeResponse

packages/start/src/middleware/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function wrapResponseMiddleware(onBeforeResponse: ResponseMiddleware): Middlewar
3636

3737
const fetchEvent = getFetchEvent(h3Event);
3838
const mwResponse = await onBeforeResponse(fetchEvent, {
39-
body: (resp as any)?.body,
39+
body: resp,
4040
});
4141
if (mwResponse) return mwResponse;
4242
};

0 commit comments

Comments
 (0)