Skip to content

Commit

Permalink
Fix: Only display next relevant child sub contentobjects (fixes #211) (
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Apr 9, 2024
1 parent bef9e76 commit b7d260b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/getPageLevelProgressItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default function getPageLevelProgressItemsJSON(parentModel) {
const isDescendantCurrentPage = (model === parentModel);
if (!isInAPage && !isDescendantContentObject) return false;
if (isInAPage && !isDescendantCurrentPage && !isDescendantContentObject) return false;
const descendantParentModel = descendant.getParent();
const isChildOfModel = (descendantParentModel === model);
if (isDescendantContentObject && !isChildOfModel) return false;
return (descendant.get('_isAvailable') === true);
});
const availableItems = completionCalculations.filterAvailableChildren(currentPageItems);
Expand Down

0 comments on commit b7d260b

Please sign in to comment.