Skip to content

Commit 0964fe0

Browse files
committed
Fix progress pill type check to ensure stages array is not empty before evaluation.
1 parent 678df5e commit 0964fe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/components/course-page/configure-extensions-modal/extension-card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default class ExtensionCard extends Component<Signature> {
4444

4545
get progressPillType(): 'completed' | 'in_progress' | null {
4646
const stages = this.args.extension.sortedStages;
47-
const allComplete = stages.every((stage) => this.args.repository.stageIsComplete(stage));
47+
const allComplete = stages.length > 0 && stages.every((stage) => this.args.repository.stageIsComplete(stage));
4848
const currentStageInExtension = this.args.repository.currentStage && stages.includes(this.args.repository.currentStage);
4949

5050
if (allComplete) return 'completed';

0 commit comments

Comments
 (0)