Skip to content

Commit

Permalink
refactor: tweak up res.end
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jan 26, 2022
1 parent 5f78461 commit 336a3cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/js/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ export default class Response implements IResponse {
return this
}
this.end = (chunk: IData, encoding?: ?string): IResponse => {
if (chunk) {
write(chunk, encoding)
}
this.write(chunk, encoding)
this.emit('finish')
return this
}
Expand Down

0 comments on commit 336a3cc

Please sign in to comment.