Skip to content

Commit ac07113

Browse files
committed
#161 Fix Decimal instances deemed plain objects
1 parent 66a21ee commit ac07113

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

decimal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4862,7 +4862,7 @@
48624862

48634863
// Create and configure initial Decimal constructor.
48644864
Decimal = clone(DEFAULTS);
4865-
4865+
Decimal.prototype.constructor = Decimal;
48664866
Decimal['default'] = Decimal.Decimal = Decimal;
48674867

48684868
// Create the internal constants from their string values.

decimal.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4861,6 +4861,7 @@ P[Symbol.toStringTag] = 'Decimal';
48614861

48624862
// Create and configure initial Decimal constructor.
48634863
export var Decimal = clone(DEFAULTS);
4864+
Decimal.prototype.constructor = Decimal;
48644865

48654866
// Create the internal constants from their string values.
48664867
LN10 = new Decimal(LN10);

0 commit comments

Comments
 (0)