Skip to content

Commit

Permalink
fix(tools): safely access handle points (#1739)
Browse files Browse the repository at this point in the history
Co-authored-by: Ramon Emiliani <[email protected]>
  • Loading branch information
ramonemiliani93 and Ramon Emiliani authored Jan 9, 2025
1 parent 5a18bdf commit 9fe63af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 9fe63af

Please sign in to comment.