From 68403ae1a2eb6fe777ae5a298651df9a0b84ae88 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 18 Feb 2013 00:41:57 -0800 Subject: [PATCH] JS: Fix Add for Amount. --- src/js/amount.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/amount.js b/src/js/amount.js index 39fab475ac..a242d82474 100644 --- a/src/js/amount.js +++ b/src/js/amount.js @@ -115,8 +115,8 @@ Amount.prototype.add = function (v) { result = this; } else if (this.is_zero()) { - result = new Amount(); - result._is_native = false; + result = v.clone(); + // YYY Why are these cloned? We never modify them. result._currency = this._currency.clone(); result._issuer = this._issuer.clone(); }