Skip to content

Commit

Permalink
handle currentStep=null
Browse files Browse the repository at this point in the history
  • Loading branch information
scott grayson authored and scott grayson committed Feb 5, 2025
1 parent 9fe47ae commit 094f887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Course.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function linkToCurrentStep(): string
{
$step = $this->currentStep();

if ($step->completed_at && $step->last_step) {
if ($step && $step->completed_at && $step->last_step) {
return $this->certificateUrl();
}

Expand Down

0 comments on commit 094f887

Please sign in to comment.