From ead714717da818361db2e5029575622c439b979a Mon Sep 17 00:00:00 2001 From: Angelina Nguyen Date: Fri, 9 Feb 2024 19:59:18 +1100 Subject: [PATCH] see pr: https://github.com/niklasvh/html2canvas/pull/3043 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: commit 4a0f97bcfb7a7fb2f843094179a37a1862946bd7 Author: Cornelius Weiß Date: Fri Apr 14 18:13:40 2023 +0200 make hotfix branch includeable via webpack commit 7a8d21a4279946195ce059880457f92372b3fa24 Author: ccheng-dev Date: Mon Mar 27 08:24:33 2023 +0200 fix: intrinsicProportion is not a number --- src/render/canvas/canvas-renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/canvas/canvas-renderer.ts b/src/render/canvas/canvas-renderer.ts index 7c60182c9..00872c409 100644 --- a/src/render/canvas/canvas-renderer.ts +++ b/src/render/canvas/canvas-renderer.ts @@ -602,7 +602,7 @@ export class CanvasRenderer extends Renderer { const [path, x, y, width, height] = calculateBackgroundRendering(container, index, [ image.width, image.height, - image.width / image.height + isNaN(image.width / image.height) ? 1 : image.width / image.height ]); const pattern = this.ctx.createPattern( this.resizeImage(image, width, height),