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

Skip to content

Commit 0224fa0

Browse files
committed
store type of
1 parent b73d395 commit 0224fa0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/plots/cartesian/axis_autotype.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ function category(a, convertNumeric) {
8585
if(seen[stri]) continue;
8686
seen[stri] = 1;
8787

88-
if(typeof ai === 'boolean') curvecats++;
89-
else if(convertNumeric ? Lib.cleanNumber(ai) !== BADNUM : typeof ai === 'number') curvenums++;
90-
else if(typeof ai === 'string') curvecats++;
88+
var t = typeof ai;
89+
if(t === 'boolean') curvecats++;
90+
else if(convertNumeric ? Lib.cleanNumber(ai) !== BADNUM : t === 'number') curvenums++;
91+
else if(t === 'string') curvecats++;
9192
}
9293

9394
return curvecats > curvenums * 2;

0 commit comments

Comments
 (0)