Skip to content

Commit

Permalink
refactor(geom-splines): minor refactor internal helper
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 11, 2022
1 parent c37c27e commit 82c0cea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/geom-splines/src/internal/sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ export const __sampleArray =
const n = segments.length - 1;
return Array.prototype.concat.apply(
[],
segments.map((seg, i) => {
const last = !closed && i === n;
return fn(seg, { ..._opts, last });
})
segments.map((seg, i) =>
fn(seg, { ..._opts, last: !closed && i === n })
)
);
};

0 comments on commit 82c0cea

Please sign in to comment.