Skip to content

Commit

Permalink
fix: initialise res.req (#80)
Browse files Browse the repository at this point in the history
* fix: initialise `res.req`

* fix: check if res.req exists

* fix: polyfill instead
  • Loading branch information
danielroe committed Mar 31, 2022
1 parent b5ba482 commit 57db02d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export function createEvent (req: http.IncomingMessage, res: http.ServerResponse
// @ts-ignore
res.res = res
// @ts-ignore
res.req = res.req || {}
// @ts-ignore
res.req.res = res
// @ts-ignore
res.req.req = req
Expand Down

0 comments on commit 57db02d

Please sign in to comment.