mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2026-03-02 03:49:24 +00:00
Decimal(v) now works even if v is from a different instance of Decimal
This commit is contained in:
@@ -4261,7 +4261,7 @@
|
|||||||
x.constructor = Decimal;
|
x.constructor = Decimal;
|
||||||
|
|
||||||
// Duplicate.
|
// Duplicate.
|
||||||
if (v instanceof Decimal) {
|
if (isDecimalInstance(v)) {
|
||||||
x.s = v.s;
|
x.s = v.s;
|
||||||
|
|
||||||
if (external) {
|
if (external) {
|
||||||
|
|||||||
2
decimal.min.js
vendored
2
decimal.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4257,7 +4257,7 @@ function clone(obj) {
|
|||||||
x.constructor = Decimal;
|
x.constructor = Decimal;
|
||||||
|
|
||||||
// Duplicate.
|
// Duplicate.
|
||||||
if (v instanceof Decimal) {
|
if (isDecimalInstance(v)) {
|
||||||
x.s = v.s;
|
x.s = v.s;
|
||||||
|
|
||||||
if (external) {
|
if (external) {
|
||||||
|
|||||||
Reference in New Issue
Block a user