Skip to content

Commit 227bba9

Browse files
authored
Merge pull request #7893 from plotly/cam/7892/update-sortAxisCategoriesByValue-conditional-check
fix: Handle NaN values in sortAxisCategoriesByValue conditional check
2 parents c23d3b3 + 75bd726 commit 227bba9

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)