Skip to content

Commit

Permalink
fix: sentry-f25281abb20a4260aa424741c30e5756 (#8888)
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlewind authored Dec 7, 2024
1 parent 6beea79 commit e2ace2f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/framework/global/src/utils/curve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ export function getBezierNearestPoint(
export function getBezierParameters(
points: PointLocation[]
): BezierCurveParameters {
// Fallback for degenerate Bezier curve (all points are at the same position)
if (points.length === 1) {
const point = points[0];
return [point, point, point, point];
}

return [points[0], points[0].absOut, points[1].absIn, points[1]];
}

Expand Down

0 comments on commit e2ace2f

Please sign in to comment.