panel > project : fix get steps of new projects
This commit is contained in:
parent
462a8e9028
commit
86f46b59cf
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue