Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abcd729

Browse files
committed
Clean ESLint errors in CI
1 parent 91cfaa4 commit abcd729

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/plots/cartesian/set_convert.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ module.exports = function setConvert(ax, fullLayout) {
126126
*/
127127
function setCategoryIndex(v) {
128128
if(v !== null && v !== undefined) {
129-
if (ax._categoriesMap === undefined)
129+
if(ax._categoriesMap === undefined) {
130130
ax._categoriesMap = {};
131+
}
131132

132-
if (ax._categoriesMap[v] !== undefined) {
133+
if(ax._categoriesMap[v] !== undefined) {
133134
return ax._categoriesMap[v];
134135
} else {
135136
ax._categories.push(v);
@@ -146,11 +147,10 @@ module.exports = function setConvert(ax, fullLayout) {
146147
function getCategoryIndex(v) {
147148
// d2l/d2c variant that that won't add categories but will also
148149
// allow numbers to be mapped to the linearized axis positions
149-
if(ax._categoriesMap)
150-
var index = ax._categoriesMap[v]?ax._categoriesMap:undefined;
151-
152-
if(index !== undefined) return index;
153-
if(typeof v === 'number') return v;
150+
var index;
151+
if(ax._categoriesMap) { index = ax._categoriesMap[v] ? ax._categoriesMap : undefined; }
152+
if(index !== undefined) { return index; }
153+
if(typeof v === 'number') { return v; }
154154
}
155155

156156
function l2p(v) {

src/plots/plots.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,9 +1951,9 @@ plots.doCalcdata = function(gd, traces) {
19511951
for(i = 0; i < axList.length; i++) {
19521952
axList[i]._categories = axList[i]._initialCategories.slice();
19531953

1954-
//Build the lookup map for initialized categories
1954+
// Build the lookup map for initialized categories
19551955
axList[i]._categoriesMap = {};
1956-
for (var j = 0; j < axList[i]._categories.length; j++) {
1956+
for(j = 0; j < axList[i]._categories.length; j++) {
19571957
axList[i]._categoriesMap[axList[i]._categories[j]] = j;
19581958
}
19591959

@@ -2001,7 +2001,7 @@ plots.doCalcdata = function(gd, traces) {
20012001
axList[i]._min = [];
20022002
axList[i]._max = [];
20032003
axList[i]._categories = [];
2004-
//Reset the look up map
2004+
// Reset the look up map
20052005
axList[i]._categoriesMap = {};
20062006
}
20072007
}

0 commit comments

Comments
 (0)