1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

fix: Crash when adding a new point in the line editor #5602 (#5606)

Update linearElementEditor.ts
This commit is contained in:
zsviczian 2022-08-22 07:09:27 +02:00 committed by GitHub
parent ec350ba8b2
commit f1ae37c84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -686,7 +686,9 @@ export class LinearElementEditor {
const point = element.points[index];
const { x, y } = element;
return rotate(x + point[0], y + point[1], cx, cy, element.angle);
return point
? rotate(x + point[0], y + point[1], cx, cy, element.angle)
: rotate(x, y, cx, cy, element.angle);
}
static pointFromAbsoluteCoords(