diff --git a/Services/ReferenceService.php b/Services/ReferenceService.php index 9d180b8..aa66118 100644 --- a/Services/ReferenceService.php +++ b/Services/ReferenceService.php @@ -59,10 +59,10 @@ function ($child, $key) use ($uuid) { $references = []; foreach ($usedItems as $item) { - $refPage = site()->findPageOrDraft($item['uri']); + $refPage = site()->findPageOrDraft($item['uri']) ?? site()->draft($item['uri']); $references[] = [ - 'title' => $refPage->title()->value, + 'title' => $refPage->title()->value ?? '', 'url' => $refPage->url(), 'slug' => $refPage->slug(), 'breadcrumb' => $refPage->panel()->breadcrumb(),