Swapped order of checks
This commit is contained in:
parent
33e37950f9
commit
47d60ad86a
|
@ -261,12 +261,12 @@ var number = function(val) {
|
||||||
val = parseInt(val, 10);
|
val = parseInt(val, 10);
|
||||||
if (isNaN(val)) val = 0;
|
if (isNaN(val)) val = 0;
|
||||||
|
|
||||||
if (val > 999) {
|
|
||||||
return (val / 1000).toFixed(1) + "K";
|
|
||||||
}
|
|
||||||
if (val > 999999) {
|
if (val > 999999) {
|
||||||
return (val / 1000000).toFixed(1) + "M";
|
return (val / 1000000).toFixed(1) + "M";
|
||||||
}
|
}
|
||||||
|
if (val > 999) {
|
||||||
|
return (val / 1000).toFixed(1) + "K";
|
||||||
|
}
|
||||||
return val.toString();
|
return val.toString();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue