Skip to content

Commit

Permalink
Merge pull request #52 from otacke/HFP-3825
Browse files Browse the repository at this point in the history
HFP-3825 Add guard against crazy ;-) content types
  • Loading branch information
otacke authored Nov 24, 2023
2 parents 7cef872 + e23a099 commit 62335e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripts/models/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ export default class Exercise {
return; // Not relevant
}

if (!this.extendsH5PQuestion && !this.continueButton) {
return; // Guard to make robust against content types firing xAPI events when not attached
}

const isCompletedEnough =
this.params.globals.get('params').behaviour.map.roaming !== 'success';

Expand Down

0 comments on commit 62335e8

Please sign in to comment.