Skip to content

Commit

Permalink
less impact
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinkrustev authored and isaacs committed Feb 8, 2019
1 parent 7fbf13f commit d3bf1f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ class Base extends MiniPass {
this.options.failures = failures

this.onbeforeend()
!this.flowing && this.buffer.length && this.resume()
this.emit('end')
if (!this.flowing && this.buffer.length) {
super.end()
} else {
this.emit('end')
}
this.ondone()
}

Expand Down

0 comments on commit d3bf1f7

Please sign in to comment.