Skip to content

Commit

Permalink
Fix: _showEndOfPage is branching aware (fixes adaptlearning#168) (ada…
Browse files Browse the repository at this point in the history
…ptlearning#169)

Fix: _showEndOfPage is branching aware (fixes adaptlearning#168) (adaptlearning#169)
  • Loading branch information
oliverfoster authored Nov 28, 2022
1 parent a94a24a commit 5262c9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/TrickleButtonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ export default class TrickleButtonModel extends ComponentModel {
const contentObject = this.findAncestor('contentobject');
const allDescendants = contentObject.getAllDescendantModels(true);
const lastDescendant = allDescendants[allDescendants.length - 1];
return (this === lastDescendant);
const parentModel = this.getParent();
const trickleParent = getModelContainer(parentModel);
// Check if completion is blocked by another extension
const isParentFinished = (trickleParent.get('_requireCompletionOf') !== Number.POSITIVE_INFINITY);
return (isParentFinished && this === lastDescendant);
}

/**
Expand Down

0 comments on commit 5262c9b

Please sign in to comment.