diff --git a/src/bodies/polygon.ts b/src/bodies/polygon.ts index f78483f..550fba8 100644 --- a/src/bodies/polygon.ts +++ b/src/bodies/polygon.ts @@ -126,7 +126,7 @@ export class Polygon extends SATPolygon implements BBox, BodyProps { ) { super(ensureVectorPoint(position), ensurePolygonPoints(points)); - if (!points?.length) { + if (!points.length) { throw new Error("No points in polygon"); }