diff --git a/src/renderer/canvas/canvas-renderer.ts b/src/renderer/canvas/canvas-renderer.ts index 8785216..6b0dec1 100644 --- a/src/renderer/canvas/canvas-renderer.ts +++ b/src/renderer/canvas/canvas-renderer.ts @@ -257,7 +257,7 @@ export class CanvasRenderer extends Em } private _resize() { - const dpr = this._settings.devicePixelRatio || window.devicePixelRatio; + const dpr = this._settings.devicePixelRatio || window.devicePixelRatio || 1; const containerSize = this._container.getBoundingClientRect(); this._canvas.style.width = `${containerSize.width}px`;