fix: Operation is insecure on safari (#2688)

This commit is contained in:
HitenChawda46 2022-07-03 05:08:12 +05:30
parent 6020386bbe
commit aca527a9af
1 changed files with 4 additions and 3 deletions

View File

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