diff --git a/backend/src/templateFormatter.ts b/backend/src/templateFormatter.ts index 9e5e7856..142576f4 100644 --- a/backend/src/templateFormatter.ts +++ b/backend/src/templateFormatter.ts @@ -419,6 +419,7 @@ const baseValues = { }, round(arg, decimals = 0) { if (isNaN(arg)) return 0; + if (typeof arg !== "number") arg = parseFloat(arg); // should be safe since we check above if it's not a number return decimals === 0 ? Math.round(arg) : arg.toFixed(decimals); }, floor(arg) {