Still allow loops

This commit is contained in:
Mark Tolmacs 2025-05-01 14:07:57 +02:00
parent 87b0ab826a
commit 570fa803d6
No known key found for this signature in database

View file

@ -23,13 +23,15 @@ export const isInvisiblySmallElement = (
if (isLinearElement(element) || isFreeDrawElement(element)) {
return (
element.points.length < 2 ||
pointsEqual(
element.points[0],
element.points[element.points.length - 1],
INVISIBLY_SMALL_ELEMENT_SIZE,
)
(element.points.length === 2 &&
pointsEqual(
element.points[0],
element.points[element.points.length - 1],
INVISIBLY_SMALL_ELEMENT_SIZE,
))
);
}
return element.width === 0 && element.height === 0;
};