diff --git a/packages/math/src/decimal.ts b/packages/math/src/decimal.ts index 0a6a798b..6e23489c 100644 --- a/packages/math/src/decimal.ts +++ b/packages/math/src/decimal.ts @@ -24,7 +24,10 @@ export class Decimal { let whole: string; let fractional: string; - if (input.search(/\./) === -1) { + if (input === "") { + whole = "0"; + fractional = ""; + } else if (input.search(/\./) === -1) { // integer format, no separator whole = input; fractional = "";