Skip to content

Commit

Permalink
Fix: Correctly calculate effective completion on blocks (fixes #63)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Aug 14, 2024
1 parent fb3ebe7 commit c4d105b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/adapt-contrib-branching.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ class Branching extends Backbone.Controller {
* @param {Backbone.model} model
*/
checkIfIsEffectivelyComplete(model) {
const childModel = model.getParent();
const childModel = model.get('_type') === 'component'
? model.getParent()
: model;
if (!childModel) return;
const isBranchChild = childModel.get('_isBranchChild');
if (!isBranchChild) return;
Expand Down

0 comments on commit c4d105b

Please sign in to comment.