Skip to content

Commit

Permalink
transpileable array length in fetchOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed May 31, 2018
1 parent 068dd9b commit 542f423
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/bitso.js
Expand Up @@ -376,7 +376,8 @@ module.exports = class bitso extends Exchange {
let response = await this.privateGetOrdersOid ({
'oid': id,
});
if (!Array.isArray (response['payload']) || (response['payload'].length !== 1)) {
let numOrders = response['payload'].length;
if (!Array.isArray (response['payload']) || (numOrders !== 1)) {
throw new OrderNotFound (this.id + ': The order ' + id + ' not found.');
}
return this.parseOrder (response['payload'][0], market);
Expand Down

0 comments on commit 542f423

Please sign in to comment.