Skip to content

Commit 19e17a8

Browse files
committed
[FIX] Amount: clone in ratio_human, product_human
Amount.ratio_human and Amount.product_human should change and return the cloned Amount object.
1 parent c865ae9 commit 19e17a8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/js/ripple/amount.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ Amount.prototype.divide = function(divisor) {
197197
Amount.prototype.ratio_human = function(denominator, opts) {
198198
opts = extend({ }, opts);
199199

200-
/*eslint-disable consistent-this */
201-
var numerator = this;
202-
/*eslint-enable consistent-this */
200+
var numerator = this.clone();
203201

204202
denominator = Amount.from_json(denominator);
205203

0 commit comments

Comments
 (0)