From 21cdb70072d9ea526ea7b1d857ca1d55c503cefe Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Mon, 26 Aug 2024 10:54:42 -0400 Subject: [PATCH] Cleanup --- src/fields/Country.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/fields/Country.php b/src/fields/Country.php index 6b1fab62ea1..ab6e57f7c87 100644 --- a/src/fields/Country.php +++ b/src/fields/Country.php @@ -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() ?? ''; } }