Skip to content
Snippets Groups Projects
Commit e8c34d33 authored by Alex Pott's avatar Alex Pott Committed by Narendra Singh Rathore
Browse files

Applied Alex suggestion

parent 91769f19
No related branches found
No related tags found
1 merge request!5708Resolve #2473989 "Lack of dynamic"
......@@ -120,7 +120,7 @@ protected function viewValue(FieldItemInterface $item) {
// \Drupal\Core\Language\LanguageInterface::LANGCODE_NOT_SPECIFIED
// and \Drupal\Core\Language\LanguageInterface::LANGCODE_NOT_APPLICABLE are
// not returned from the language manager above.
$value = '';
$value = [];
if (isset($item->language)) {
$name = isset($languages[$item->language->getId()]) ? $languages[$item->language->getId()]->getName() : $item->language->getId();
$value = ['#plain_text' => $name];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment