diff --git a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php index 571a6e547cb..e20d1a49c47 100644 --- a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php +++ b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php @@ -39,10 +39,13 @@ public function getItems(): Collection private function searchForDropdownPriorityInNavigationConfig(string $groupKey): ?int { - return Config::getArray('hyde.navigation.order', [ + /** @var array $config */ + $config = Config::getArray('hyde.navigation.order', [ 'index' => 0, 'posts' => 10, 'docs/index' => 100, - ])[$groupKey] ?? null; + ]); + + return $config[$groupKey] ?? null; } }