diff --git a/public/site/models/project.php b/public/site/models/project.php index 7e74452..f3b8fe1 100644 --- a/public/site/models/project.php +++ b/public/site/models/project.php @@ -7,7 +7,7 @@ class ProjectPage extends NotificationsPage { $apiCache = kirby()->cache('api'); $stepsData = $apiCache->get($this->slug() . '_' . 'steps'); - if ($stepsData === null) { + if ($stepsData === null || count($stepsData) === 0) { $steps = []; foreach ($this->children() as $child) { @@ -21,6 +21,7 @@ class ProjectPage extends NotificationsPage { usort($steps, fn($a, $b) => $a['index'] <=> $b['index']); $apiCache->set($this->slug() . '_' . 'steps', $steps); + return $steps; } else { return $stepsData;