Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Aug 26, 2024
1 parent 8f25931 commit 21cdb70
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/fields/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ public function getElementConditionRuleType(): array|string|null
public function getTableAttributeHtml(mixed $value, ElementInterface $element): string
{
/** @var CountryModel|null $value */
if (!$value) {
return '';
}

$list = Craft::$app->getAddresses()->getCountryRepository()->getList(Craft::$app->language);
return $list[$value->getCountryCode()] ?? $value;
return $value?->getName() ?? '';
}
}

0 comments on commit 21cdb70

Please sign in to comment.