fix: [genericElement:singleView] Allow displaying object not included in an array

pull/59/head
mokaddem 2021-06-12 12:00:06 +02:00
parent 7e47c48ef3
commit 835dbd88c8
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
$string = $field['raw']; $string = $field['raw'];
} else { } else {
$value = Cake\Utility\Hash::extract($data, $field['path']); $value = Cake\Utility\Hash::extract($data, $field['path']);
$string = empty($value[0]) ? '' : $value[0]; $string = count($value) == 0 ? '' : $value;
} }
echo sprintf( echo sprintf(
'<div class="json_container_%s"></div>', '<div class="json_container_%s"></div>',