Skip to content

Commit

Permalink
Fix convex function ignoring given properties (Turfjs#2762)
Browse files Browse the repository at this point in the history
  • Loading branch information
kareemjeiroudi committed Dec 10, 2024
1 parent 42ad7b8 commit 5126ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/turf-convex/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function convex<P extends GeoJsonProperties = GeoJsonProperties>(

// Convex hull should have at least 3 different vertices in order to create a valid polygon
if (convexHull.length > 3) {
return polygon([convexHull]);
return polygon<P>([convexHull], options.properties);
}
return null;
}
Expand Down

0 comments on commit 5126ba3

Please sign in to comment.