mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
fix: crash on tag round() with >100 decimals
This commit is contained in:
parent
47886f83cb
commit
062cb053cc
1 changed files with 1 additions and 1 deletions
|
@ -419,7 +419,7 @@ const baseValues = {
|
||||||
},
|
},
|
||||||
round(arg, decimals = 0) {
|
round(arg, decimals = 0) {
|
||||||
if (isNaN(arg)) return 0;
|
if (isNaN(arg)) return 0;
|
||||||
return decimals === 0 ? Math.round(arg) : arg.toFixed(decimals);
|
return decimals === 0 ? Math.round(arg) : arg.toFixed(Math.max(0, Math.min(decimals, 100)));
|
||||||
},
|
},
|
||||||
add(...args) {
|
add(...args) {
|
||||||
return args.reduce((result, arg) => {
|
return args.reduce((result, arg) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue