From b5a6ae27d958a3a03905a8d20295493347a6433f Mon Sep 17 00:00:00 2001 From: Anthony Protano Date: Mon, 4 Nov 2024 15:42:15 -0500 Subject: [PATCH] Hot Fix: Fixes bad checkbox case data --- src/app/Models/PageSection.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;