Skip to content

Commit

Permalink
Unpack the array directly
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 10, 2024
1 parent c6cdbab commit b0bbfa7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function generate(): void
collect(Config::getArray('hyde.navigation.custom', []))->each(function (array $item): void {
/** @var array{destination: string, label: ?string, priority: ?int, attributes: array<string, scalar>} $item */
// Since these were added explicitly by the user, we can assume they should always be shown
$this->items->push(NavigationItem::create($item['destination'], $item['label'] ?? null, $item['priority'] ?? null, $item['attributes'] ?? []));
$this->items->push(NavigationItem::create(...$item));
});
}
}
Expand Down

0 comments on commit b0bbfa7

Please sign in to comment.