Skip to content

Commit

Permalink
Fixed a bug with samples per segment being less than 1
Browse files Browse the repository at this point in the history
  • Loading branch information
cereallarceny committed Jul 16, 2019
1 parent fd3c4c9 commit fbb5f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const getData = (
: path.node();

// We decrement the number of samples per segment because when we group them later we will add on the first sample of the following segment
numSamPerSeg--;
if (numSamPerSeg > 1) numSamPerSeg--;

// Get total length of path, total number of samples, and two blank arrays to hold samples and segments
const pathLength = path.getTotalLength(),
Expand Down

0 comments on commit fbb5f8d

Please sign in to comment.