diff --git a/classes/Router.php b/classes/Router.php index 51a5ade..83c9f9a 100644 --- a/classes/Router.php +++ b/classes/Router.php @@ -115,7 +115,8 @@ protected function loadUrlMap() 'titles' => [] ]; foreach ($pages as $page) { - $url = $page->getViewBag()->property('url'); + $viewBag = $page->getViewBag(); + $url = $viewBag ? $viewBag->property('url') : null; if (!$url) { continue; }