Skip to content

Commit 21d813e

Browse files
author
John Soklaski
committed
Fix off by one error in flattenUniqueSort
1 parent 92e73fe commit 21d813e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/cartesian/ordered_categories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function flattenUniqueSort(axisLetter, sortFunction, data) {
4141
insertionIndex = bisector(categoryArray, category);
4242

4343
// skip loop on already encountered values
44-
if(insertionIndex < categoryArray.length - 1 && categoryArray[insertionIndex] === category) continue;
44+
if(insertionIndex < categoryArray.length && categoryArray[insertionIndex] === category) continue;
4545

4646
// insert value
4747
categoryArray.splice(insertionIndex, 0, category);

0 commit comments

Comments
 (0)