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 authored Feb 28, 2024
1 parent 876702a commit 2808320
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 2808320

Please sign in to comment.