fix: [genericElement:singleView] Improved display of json field

pull/68/head
mokaddem 2021-07-07 15:11:52 +02:00
parent 41e9666224
commit aa66b4fbf5
1 changed files with 2 additions and 2 deletions

View File

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