diff --git a/packages/geom-resample/src/axis.ts b/packages/geom-resample/src/axis.ts index 5f37531c87..369e29a448 100644 --- a/packages/geom-resample/src/axis.ts +++ b/packages/geom-resample/src/axis.ts @@ -44,7 +44,7 @@ export const sampleUniformX = ( for (let x = x1; x <= x2; x += step) { res.push( ( - intersectRayPolyline([x, startY], [0, 1], pts, false).isec! + intersectRayPolyline([x, startY], [0, 1], pts, false).isec![0] ) ); } @@ -73,7 +73,7 @@ export const sampleUniformY = ( for (let y = y1; y <= y2; y += step) { res.push( ( - intersectRayPolyline([startX, y], [1, 0], pts, false).isec! + intersectRayPolyline([startX, y], [1, 0], pts, false).isec![0] ) ); }