diff --git a/packages/layerchart/src/lib/utils/canvas.ts b/packages/layerchart/src/lib/utils/canvas.ts index 67c3e492..557b1e39 100644 --- a/packages/layerchart/src/lib/utils/canvas.ts +++ b/packages/layerchart/src/lib/utils/canvas.ts @@ -3,7 +3,7 @@ const DEFAULT_FILL = 'rgb(0, 0, 0)'; /** Render SVG path data onto canvas context. Supports CSS classes tranferring to `` element for retrieval) */ export function renderPathData( canvasCtx: CanvasRenderingContext2D, - pathData: string | null, + pathData: string | null | undefined, props: { fill?: string; stroke?: string; strokeWidth?: number; class?: string } = {} ) { // Get classes from nearest `` element. Useful if classes are moved up from underlying component (ex. GeoPath)