canvas - removed block of code that caused issues on safari

This commit is contained in:
Hamaad Chughtai 2023-02-16 12:29:05 -05:00 committed by Hamaad Chughtai
parent 6020386bbe
commit 162dcc3bef
1 changed files with 0 additions and 4 deletions

View File

@ -569,10 +569,6 @@ export class CanvasRenderer extends Renderer {
}
resizeImage(image: HTMLImageElement, width: number, height: number): HTMLCanvasElement | HTMLImageElement {
if (image.width === width && image.height === height) {
return image;
}
const ownerDocument = this.canvas.ownerDocument ?? document;
const canvas = ownerDocument.createElement('canvas');
canvas.width = Math.max(1, width);