From 28083201693c8638eb7e2f34fd77c154ab802396 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Wed, 28 Feb 2024 20:06:01 +1100 Subject: [PATCH] include original id in line-slice --- packages/turf-line-slice/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/turf-line-slice/index.js b/packages/turf-line-slice/index.js index dc66da4140..c2ae9166c5 100644 --- a/packages/turf-line-slice/index.js +++ b/packages/turf-line-slice/index.js @@ -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 };