Skip to content

Commit 40e2d77

Browse files
committed
fix: getImageData and bump version to 1.1.1
1 parent 51a1b36 commit 40e2d77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "canvas-constructor",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "A ES6 class for node-canvas with built-in functions and chained methods.",
55
"main": "index",
66
"types": "typings/index.d.ts",

src/canvas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class CanvasConstructor {
218218
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData
219219
*/
220220
getImageData(dx = 0, dy = 0, width = this.width, height = this.height, callback) {
221-
if (typeof x === 'function') {
221+
if (typeof dx === 'function') {
222222
callback = dx;
223223
dx = 0;
224224
}

0 commit comments

Comments
 (0)