8000 Cut zero bug fixed · etherscan-io/Ethplorer@b519081 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit b519081

Browse files
committed
Cut zero bug fixed
1 parent 00ba4e1 commit b519081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/ethplorer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ Ethplorer = {
21082108
}
21092109
if((num.toString().indexOf("e-") > 0) && withDecimals){
21102110
var res = Ethplorer.Utils.toBig(num).toFixed(decimals);
2111-
if(cutZeroes){
2111+
if(cutZeroes && (res.indexOf(".") > 0)){
21122112
res = res.replace(/0*$/, '').replace(/\.$/, '.00');
21132113
}
21142114
return res;

0 commit comments

Comments
 (0)
0