From ac0711318fff9c0eb92621b2336b6c5a083bb337 Mon Sep 17 00:00:00 2001 From: Michael Mclaughlin Date: Tue, 22 Jun 2021 10:53:21 +0100 Subject: [PATCH] #161 Fix Decimal instances deemed plain objects --- decimal.js | 2 +- decimal.mjs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/decimal.js b/decimal.js index e58df57..8f445dd 100644 --- a/decimal.js +++ b/decimal.js @@ -4862,7 +4862,7 @@ // Create and configure initial Decimal constructor. Decimal = clone(DEFAULTS); - + Decimal.prototype.constructor = Decimal; Decimal['default'] = Decimal.Decimal = Decimal; // Create the internal constants from their string values. diff --git a/decimal.mjs b/decimal.mjs index a319764..6ef5d42 100644 --- a/decimal.mjs +++ b/decimal.mjs @@ -4861,6 +4861,7 @@ P[Symbol.toStringTag] = 'Decimal'; // Create and configure initial Decimal constructor. export var Decimal = clone(DEFAULTS); +Decimal.prototype.constructor = Decimal; // Create the internal constants from their string values. LN10 = new Decimal(LN10);