mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2025-06-09 19:04:18 +00:00
Fix Space and Null
This commit is contained in:
parent
11699c1d1c
commit
7d8952f623
@ -4252,7 +4252,8 @@
|
||||
function Decimal(v) {
|
||||
var e, i, t,
|
||||
x = this;
|
||||
|
||||
if (typeof v !== "undefined" && v && v.constructor === String) v = v.trim();
|
||||
if (typeof v === "undefined" || !v) v = "0";
|
||||
// Decimal called without new.
|
||||
if (!(x instanceof Decimal)) return new Decimal(v);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user