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() ?? ''; } }