diff --git a/Classes/Http/TranslationRequestMiddleware.php b/Classes/Http/TranslationRequestMiddleware.php index 207d073..b7688f3 100644 --- a/Classes/Http/TranslationRequestMiddleware.php +++ b/Classes/Http/TranslationRequestMiddleware.php @@ -157,7 +157,15 @@ class TranslationRequestMiddleware implements MiddlewareInterface \ARRAY_FILTER_USE_KEY ); $result[$package] += \array_map( - static fn($value) => $value[0]['target'], + static function ($value) { + if (\count($value) === 1) { + return $value[0]['target']; + } + return \array_map( + static fn ($value) => $value['target'], + $value + ); + }, $matchingUnits ); }