Skip to content

Commit

Permalink
fix(geom): fix path __samples attrib handling in asPolygon() & asPo…
Browse files Browse the repository at this point in the history
…lyline() impls
  • Loading branch information
postspectacular committed May 29, 2024
1 parent 5d594c6 commit 3d7bd8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/geom/src/as-polygon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const asPolygon = <AsPolygonFn>(
),

path: ($: Path, opts) => {
const tmp = new Path();
const tmp = new Path([], [], $.attribs);
return [$.segments, ...$.subPaths].map((segments) => {
tmp.segments = segments;
return new Polygon(vertices(tmp, opts), __attribs($));
Expand Down
2 changes: 1 addition & 1 deletion packages/geom/src/as-polyline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const asPolyline = <AsPolylineFn>(
],

path: ($: Path, opts) => {
const tmp = new Path();
const tmp = new Path([], [], $.attribs);
return [$.segments, ...$.subPaths].map((segments) => {
tmp.segments = segments;
const pts = vertices(tmp, opts);
Expand Down

0 comments on commit 3d7bd8c

Please sign in to comment.