fix: handle potential null value for gender in genderLabel method

This commit is contained in:
Yoga Pangestu 2026-08-04 23:08:39 +07:00
parent 4517eeb7ee
commit a8a7ed4c69

View File

@ -37,7 +37,7 @@ protected function formattedBirthDate(): Attribute
protected function genderLabel(): Attribute
{
return Attribute::make(
get: fn () => $this->gender->label(),
get: fn () => $this->gender?->label(),
);
}