Skip to content

Commit 18451a5

Browse files
authored
Use canvas width/height for futureproofing
1 parent ef2fc7c commit 18451a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/backpack/jpeg-thumbnail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const jpegThumbnail = dataUrl => new Promise((resolve, reject) => {
1111
// drawImage can fail if image height/width is less than 1
1212
// Use blank image; the costume is too small to render anyway
1313
ctx.fillStyle = 'white'; // Create white background, since jpeg doesn't have transparency
14-
ctx.fillRect(0, 0, maxDimension, maxDimension);
14+
ctx.fillRect(0, 0, canvas.width, canvas.height);
1515
} else {
1616
if (image.height > image.width) {
1717
canvas.height = maxDimension;

0 commit comments

Comments
 (0)