Skip to content

Commit

Permalink
Fix: invalid array length in renderer (#3961)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored Dec 15, 2024
1 parent 329c849 commit 8368928
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ class Renderer extends EventEmitter<RendererEvents> {
let singleCanvasWidth = Math.min(Renderer.MAX_CANVAS_WIDTH, clientWidth, totalWidth)
let drawnIndexes: Record<number, boolean> = {}

// Nothing to render
if (singleCanvasWidth === 0) return

// Adjust width to avoid gaps between canvases when using bars
if (options.barWidth || options.barGap) {
const barWidth = options.barWidth || 0.5
Expand Down

0 comments on commit 8368928

Please sign in to comment.