mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-25 22:55:49 +00:00
[TASK] remove clone in favor of copy and update
see 'object' case in `parse_json`
This commit is contained in:
@@ -62,10 +62,6 @@ Currency.from_human = function(j, opts) {
|
|||||||
|
|
||||||
// this._value = NaN on error.
|
// this._value = NaN on error.
|
||||||
Currency.prototype.parse_json = function(j, shouldInterpretXrpAsIou) {
|
Currency.prototype.parse_json = function(j, shouldInterpretXrpAsIou) {
|
||||||
if (j instanceof Currency) {
|
|
||||||
return j.clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
this._value = NaN;
|
this._value = NaN;
|
||||||
|
|
||||||
switch (typeof j) {
|
switch (typeof j) {
|
||||||
|
|||||||
Reference in New Issue
Block a user