3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-14 21:31:50 +00:00

fix: crash on tag round() with >100 decimals

This commit is contained in:
Dragory 2023-11-18 12:55:01 +02:00
parent 47886f83cb
commit 062cb053cc
No known key found for this signature in database

View file

@ -419,7 +419,7 @@ const baseValues = {
},
round(arg, decimals = 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) {
return args.reduce((result, arg) => {