Skip to content

Commit 7a8d21a

Browse files
committed
fix: intrinsicProportion is not a number
1 parent 6020386 commit 7a8d21a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/render/canvas/canvas-renderer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ export class CanvasRenderer extends Renderer {
598598
const [path, x, y, width, height] = calculateBackgroundRendering(container, index, [
599599
image.width,
600600
image.height,
601-
image.width / image.height
601+
isNaN(image.width / image.height) ? 1 : (image.width / image.height)
602602
]);
603603
const pattern = this.ctx.createPattern(
604604
this.resizeImage(image, width, height),

0 commit comments

Comments
 (0)