Skip to content

Commit 6e5a599

Browse files
authored
Merge pull request #180 from m93a/patch-isdecimal
Make the constructor accept different instances of Decimal
2 parents 6545e24 + 498327d commit 6e5a599

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

decimal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4261,7 +4261,7 @@
42614261
x.constructor = Decimal;
42624262

42634263
// Duplicate.
4264-
if (v instanceof Decimal) {
4264+
if (isDecimalInstance(v)) {
42654265
x.s = v.s;
42664266

42674267
if (external) {

decimal.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

decimal.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

decimal.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4257,7 +4257,7 @@ function clone(obj) {
42574257
x.constructor = Decimal;
42584258

42594259
// Duplicate.
4260-
if (v instanceof Decimal) {
4260+
if (isDecimalInstance(v)) {
42614261
x.s = v.s;
42624262

42634263
if (external) {

0 commit comments

Comments
 (0)