Skip to content

Commit

Permalink
fix unhandled promise rejection in .asBuffer()
Browse files Browse the repository at this point in the history
Refs #312
  • Loading branch information
rkusa committed Jul 22, 2023
1 parent ba5aa33 commit ff53257
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Fixed
- Fixed unhandled promise rejection in `doc.asBuffer()`

## [2.5.0]
### Fixed
- Fixed footer position after changing it #283
- Fixed graphical state not reset hwen using templates (could lead to rotated/translated pages) #287
- Fixed importing fonts in ESM context (in TS projects) #309
Expand Down
2 changes: 1 addition & 1 deletion lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ class Document extends Readable {
this.on("end", () => resolve(Buffer.concat(chunks)));
this.on("error", reject);
if (shouldEnd) {
this.end();
return this.end();
}
});
if (typeof callback === "function") {
Expand Down

0 comments on commit ff53257

Please sign in to comment.