From 19e17a8431550cf156b1ad669a19dedfe4e28e4a Mon Sep 17 00:00:00 2001 From: Vahe Hovhannisyan Date: Wed, 18 Mar 2015 16:17:43 -0700 Subject: [PATCH] [FIX] Amount: clone in ratio_human, product_human Amount.ratio_human and Amount.product_human should change and return the cloned Amount object. --- src/js/ripple/amount.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/js/ripple/amount.js b/src/js/ripple/amount.js index b887d131..2a3f56e7 100644 --- a/src/js/ripple/amount.js +++ b/src/js/ripple/amount.js @@ -197,9 +197,7 @@ Amount.prototype.divide = function(divisor) { Amount.prototype.ratio_human = function(denominator, opts) { opts = extend({ }, opts); - /*eslint-disable consistent-this */ - var numerator = this; - /*eslint-enable consistent-this */ + var numerator = this.clone(); denominator = Amount.from_json(denominator);