mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2024-10-27 20:34:12 +00:00
Merge pull request #180 from m93a/patch-isdecimal
Make the constructor accept different instances of Decimal
This commit is contained in:
commit
6e5a599fcc
@ -4261,7 +4261,7 @@
|
||||
x.constructor = Decimal;
|
||||
|
||||
// Duplicate.
|
||||
if (v instanceof Decimal) {
|
||||
if (isDecimalInstance(v)) {
|
||||
x.s = v.s;
|
||||
|
||||
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;
|
||||
|
||||
// Duplicate.
|
||||
if (v instanceof Decimal) {
|
||||
if (isDecimalInstance(v)) {
|
||||
x.s = v.s;
|
||||
|
||||
if (external) {
|
||||
|
Loading…
Reference in New Issue
Block a user