Skip to content

Commit

Permalink
Use null check instead of instanceof on deprecated class
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 24, 2024
1 parent 5b5040b commit 9157cb4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected function addItem(NavigationItem $item): void
protected function containsOnlyDocumentationPages(): bool
{
return count($this->getItems()) && collect($this->getItems())->every(function (NavigationItem $child): bool {
return (! $child->getRoute() instanceof ExternalRoute) && $child->getRoute()->getPage() instanceof DocumentationPage;
return ($child->getRoute() !== null) && $child->getRoute()->getPage() instanceof DocumentationPage;
});
}
}

0 comments on commit 9157cb4

Please sign in to comment.