diff --git a/src/app/Models/PageSection.php b/src/app/Models/PageSection.php index b5ff04f..7917114 100644 --- a/src/app/Models/PageSection.php +++ b/src/app/Models/PageSection.php @@ -99,7 +99,11 @@ public function getFormattedDataAttribute() $data = json_decode($this->pivot->data, true); foreach ($data as $key => $d) { - $data[$key] = json_decode($d, true) ?? $d; + if (is_array($d)) { + $data[$key] = $d; + } else { + $data[$key] = json_decode($d, true) ?? $d; + } } return $data;