Skip to content

Commit

Permalink
Replaced the usage of undocumented res._header with `res.headersSen…
Browse files Browse the repository at this point in the history
  • Loading branch information
lamweili committed Aug 4, 2022
1 parent 35880d6 commit 36618af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function session(options) {
return ret;
}

if (!res._header) {
if (typeof res.headersSent === 'boolean' ? !res.headersSent : !res._header) {
res.writeHead(res.statusCode)
}

Expand Down

0 comments on commit 36618af

Please sign in to comment.