Skip to content

Commit

Permalink
fix: change usage of _header to headersSernt
Browse files Browse the repository at this point in the history
  • Loading branch information
maritz committed Sep 27, 2018
1 parent becc1c0 commit 24a6740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -80,7 +80,7 @@ function compression (options) {
return false
}

if (!this._header) {
if (!this.headersSent) {
this._implicitHeader()
}

Expand All @@ -94,7 +94,7 @@ function compression (options) {
return false
}

if (!this._header) {
if (!this.headersSent) {
// estimate the length
if (!this.getHeader('Content-Length')) {
length = chunkLength(chunk, encoding)
Expand Down

0 comments on commit 24a6740

Please sign in to comment.