Skip to content

Commit

Permalink
[TASK] add short circuit when there are no direct nor autobridged offers
Browse files Browse the repository at this point in the history
  • Loading branch information
boxbag committed May 4, 2015
1 parent d14b38b commit 64809d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/ripple/orderbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,10 @@ OrderBook.prototype.computeAutobridgedOffers = function() {
OrderBook.prototype.mergeDirectAndAutobridgedBooks = function() {
var self = this;

if (_.isEmpty(this._offers) && _.isEmpty(this._offersAutobridged)) {
return null;
}

this._mergedOffers = this._offers
.concat(this._offersAutobridged)
.sort(function(a, b) {
Expand Down

0 comments on commit 64809d9

Please sign in to comment.