Skip to content

Commit

Permalink
Hot Fix: Fixes bad checkbox case data
Browse files Browse the repository at this point in the history
  • Loading branch information
clevyr-anthony committed Nov 4, 2024
1 parent 6c40888 commit b5a6ae2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/Models/PageSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b5a6ae2

Please sign in to comment.