Skip to content

Commit 553b37a

Browse files
authored
Fix: Content object progress calculations (fixes #233) (#234)
1 parent d3fa16d commit 553b37a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

js/PageLevelProgressIndicatorView.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ class PageLevelProgressIndicatorView extends Backbone.View {
4949
}
5050

5151
calculatePercentage() {
52+
const isContentObject = this.model.isTypeGroup('contentobject');
53+
if (isContentObject) return completionCalculations.calculatePercentageComplete(this.model);
5254
const isComplete = this.model.get('_isComplete');
5355
if (isComplete) return 100;
54-
const isContentObject = this.model.isTypeGroup('contentobject');
55-
if (isContentObject) {
56-
return completionCalculations.calculatePercentageComplete(this.model);
57-
}
5856
const isPresentationComponentWithItems = (!this.model.isTypeGroup('question') && this.model instanceof ItemsComponentModel);
5957
if (isPresentationComponentWithItems) {
6058
const children = this.model.getChildren();

0 commit comments

Comments
 (0)