Skip to content

Commit

Permalink
Fix missing encoding options (quality) parameter in `canvas.toDataURL…
Browse files Browse the repository at this point in the history
…()` (#1382)

* Add missing opts parameter

* Add changelog entry
  • Loading branch information
kayahr authored and LinusU committed Mar 15, 2019
1 parent bbf8b75 commit cb958e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
### Changed
### Added
### Fixed
* Fix encoding options (quality) parameter in `canvas.toDataURL()`

2.4.0
==================
Expand Down
2 changes: 1 addition & 1 deletion lib/canvas.js
Expand Up @@ -108,6 +108,6 @@ Canvas.prototype.toDataURL = function(a1, a2, a3){
fn(null, `data:${type};base64,${buf.toString('base64')}`);
}, type, opts)
} else {
return `data:${type};base64,${this.toBuffer(type).toString('base64')}`
return `data:${type};base64,${this.toBuffer(type, opts).toString('base64')}`
}
};

0 comments on commit cb958e8

Please sign in to comment.