Skip to content

Commit

Permalink
btctradeua balance unified
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jul 23, 2017
1 parent c56950f commit ac69409
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions ccxt.es5.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ var urlencode = function (object) {
}

var sum = function (... args) {
return args.filter (arg => typeof arg != 'undefined').reduce ((sum, value) => sum + value, 0)
let result = args.filter (arg => typeof arg != 'undefined')
return (result.length > 1) ?
result.reduce ((sum, value) => sum + value, 0) :
undefined
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit ac69409

Please sign in to comment.