Skip to content

Commit

Permalink
Fix end with null / undefined wrongly writing string name
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed Feb 18, 2024
1 parent 1b5d463 commit 758489e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ export default class Request {
this[$.res].endWithoutBody()
} else {
this[$.res].end(
typeof x === 'string' || x instanceof ArrayBuffer || (x && x.buffer instanceof ArrayBuffer)
x == null
? ''
: typeof x === 'string' || x instanceof ArrayBuffer || (x && x.buffer instanceof ArrayBuffer)
? x
: '' + x
)
Expand Down

0 comments on commit 758489e

Please sign in to comment.