Skip to content

Commit 21072dd

Browse files
authored
Fix: Make contentObject:_pageLevelProgress._isEnabled atomic on nested submenus (fixes #247) (#249)
* Fix: Make contentObject:_pageLevelProgress._isEnabled atomic on nested submenus (fixes #247)
1 parent 74a83c9 commit 21072dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/getPageLevelProgressItems.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ export default function getPageLevelProgressItemsJSON(parentModel) {
1616
if (!isInAPage && !isDescendantContentObject) return false;
1717
if (isInAPage && !isDescendantCurrentPage && !isDescendantContentObject) return false;
1818
const descendantParentModel = descendant.getParent();
19+
const isParentModelShown = Boolean(descendantParentModel.get('_pageLevelProgress')?._isEnabled);
1920
const isChildOfModel = (descendantParentModel === model);
20-
if (isDescendantContentObject && !isChildOfModel) return false;
21+
if (isDescendantContentObject && isParentModelShown && !isChildOfModel) return false;
2122
return (descendant.get('_isAvailable') === true);
2223
});
2324
const availableItems = completionCalculations.filterAvailableChildren(currentPageItems);

0 commit comments

Comments
 (0)