Skip to content

Commit 2e9257c

Browse files
authored
Clarify conditional check
1 parent 5fff4b7 commit 2e9257c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/plots/plots.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3190,7 +3190,7 @@ function sortAxisCategoriesByValue(axList, gd) {
31903190

31913191
// Skip points whose position is not a valid category
31923192
// (e.g. a null/NaN coordinate maps to BADNUM)
3193-
if(!(catIndex + 1)) continue;
3193+
if (catIndex == null || catIndex < 0) continue;
31943194

31953195
value = cdi.s;
31963196
if(value === undefined) value = cdi.v;

0 commit comments

Comments
 (0)