Skip to content

Commit 75bd726

Browse files
committed
fix: Handle NaN values in sortAxisCategoriesByValue conditional check
1 parent c23d3b3 commit 75bd726

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/plots/plots.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3193,8 +3193,7 @@ function sortAxisCategoriesByValue(axList, gd) {
31933193
if(catIndex === undefined) catIndex = cdi[axLetter];
31943194

31953195
// Skip points whose position is not a valid category
3196-
// (e.g. a null/NaN coordinate maps to BADNUM)
3197-
if (catIndex == null || catIndex < 0) continue;
3196+
if (isNaN(catIndex) || catIndex < 0) continue;
31983197

31993198
value = cdi.s;
32003199
if(value === undefined) value = cdi.v;

0 commit comments

Comments
 (0)