From 2be6bd1ca110c6d1d9c20e322ee8b240a2f20703 Mon Sep 17 00:00:00 2001 From: jsomeara Date: Wed, 21 Aug 2024 18:07:19 -0700 Subject: [PATCH] Add additional lastPage check. --- public/javascripts/Gallery/src/cards/CardContainer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/javascripts/Gallery/src/cards/CardContainer.js b/public/javascripts/Gallery/src/cards/CardContainer.js index 9e2601f560..0a31b72fdf 100644 --- a/public/javascripts/Gallery/src/cards/CardContainer.js +++ b/public/javascripts/Gallery/src/cards/CardContainer.js @@ -84,6 +84,7 @@ function CardContainer(uiCardContainer, initialFilters) { // Grab first batch of labels to show. fetchLabels(labelTypeIds[currentLabelType], initialLoad, initialFilters.validationOptions, Array.from(loadedLabelIds), initialFilters.neighborhoods, initialFilters.severities, initialFilters.tags, function() { currentCards = cardsByType[currentLabelType].copy(); + lastPage = currentCards.getCards().length <= currentPage * cardsPerPage; render(); }); // Creates the Modal object in the DOM element currently present.