Skip to content

Commit

Permalink
include original id in line-slice
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey committed Aug 6, 2024
1 parent cc680d3 commit 658c8f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/turf-line-slice/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function lineSlice(startPt, stopPt, line) {
clipCoords.push(coords[i]);
}
clipCoords.push(ends[1].geometry.coordinates);
return linestring(clipCoords, line.properties);
return linestring(clipCoords, line.properties, { ...('id' in line && { id: line.id }) });
}

export { lineSlice };
Expand Down

0 comments on commit 658c8f8

Please sign in to comment.