mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix: Operation is insecure on safari (#2688)
This commit is contained in:
parent
6020386bbe
commit
aca527a9af
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user