From cb38753fe626ce16b49f8538245fef73e07eee23 Mon Sep 17 00:00:00 2001 From: gcornut Date: Thu, 23 Nov 2017 12:28:25 +0100 Subject: [PATCH] Fix bug loading only part of a two page ontology. --- src/js/BreedingAPIClient.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/BreedingAPIClient.js b/src/js/BreedingAPIClient.js index 69a4018..34490f5 100644 --- a/src/js/BreedingAPIClient.js +++ b/src/js/BreedingAPIClient.js @@ -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 { @@ -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)