Skip to content

Commit

Permalink
Fix bug loading only part of a two page ontology.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcornut committed Nov 23, 2017
1 parent 82dbb40 commit cb38753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/BreedingAPIClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function whenAll(deferreds) {
res.resolve();
} else if (deferreds.length == 1) {
deferreds[0].done(function(response) {
res.resolve(response[1]);
res.resolve([[response]]);
});
deferreds[0].fail(res.reject);
} else {
Expand Down Expand Up @@ -70,7 +70,7 @@ function fetchAllPages(breedingAPIEndpoint, path, params) {
requests.push($.get(url, currentQuery));
}

if (requests.length > 1) {
if (requests.length >= 1) {
// Executing all page requests asynchronously
whenAll(requests).done(function(responses) {
// Aggregate results of all pages (except the first)
Expand Down

0 comments on commit cb38753

Please sign in to comment.