diff --git a/packages/tools/src/utilities/contours/updateContourPolyline.ts b/packages/tools/src/utilities/contours/updateContourPolyline.ts index 53d92a2bb3..b4f68afbd9 100644 --- a/packages/tools/src/utilities/contours/updateContourPolyline.ts +++ b/packages/tools/src/utilities/contours/updateContourPolyline.ts @@ -91,7 +91,7 @@ export default function updateContourPolyline( polyline.reverse(); } - const handlePoints = data.handles.points.map((p) => worldToCanvas(p)); + const handlePoints = (data.handles?.points ?? []).map(worldToCanvas); if (handlePoints.length > 2) { const currentHandlesWindingDirection =