Skip to content

Commit

Permalink
Fix crash caused by stale cache
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers committed Aug 12, 2023
1 parent 13f0cd4 commit a272cc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a272cc3

Please sign in to comment.