Skip to content

Commit 5ade8a8

Browse files
committed
Revert to original return statement
1 parent 1c4a25d commit 5ade8a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plots/cartesian/set_convert.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ module.exports = function setConvert(ax) {
187187

188188
if(v !== null && v !== undefined && ax._categories.indexOf(v) === -1){
189189
ax._categories.push(v);
190-
return ax._categories.length - 1;
191-
}else{
192-
return constants.BADNUM;
193190
}
191+
192+
var c = ax._categories.indexOf(v);
193+
return c === -1 ? constants.BADNUM : c;
194194
};
195195

196196
ax.d2l = ax.d2c;

0 commit comments

Comments
 (0)