Skip to content

Commit

Permalink
fix: fix menu resolving with no language provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Leksat committed Oct 25, 2023
1 parent ee2104b commit a5cafad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function resolveItem(ResolverInterface $id, ?ResolverInterface $langcode
$resolver,
$this->builder->callback(function ($value, $args, ResolveContext $context, ResolveInfo $info, FieldContext $fieldContext) {
$langcode = $fieldContext->getContextValue('current_menu_language');
if ($langcode !== $value->language()->getId()) {
if ($langcode && $langcode !== $value->language()->getId()) {
$clone = clone $value;
$clone->set('langcode', $langcode);
return $clone;
Expand Down

0 comments on commit a5cafad

Please sign in to comment.