fix: intrinsicProportion is not a number

This commit is contained in:
ccheng-dev 2023-03-27 08:24:33 +02:00
parent 6020386bbe
commit 7a8d21a427

View File

@ -598,7 +598,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),