Skip to content

Commit

Permalink
Update TranslationController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Mar 15, 2022
1 parent 47b2caf commit 437a4be
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -58,7 +58,7 @@ public function export(Request $request) {
if ($namespace !== '*') {
$exportFileName = 'translation-' . $namespace;
}

$exportFileName = $exportFileName . '-' . $locale;

$getTranslations = [];
Expand All @@ -81,6 +81,10 @@ public function export(Request $request) {
$getTranslations = array_merge($getTranslations, $getTranslationsWithoutTexts->toArray());
}

if (empty($getTranslations)) {
return [];
}

$readyTranslations = [];

foreach ($getTranslations as $translation) {
Expand Down

0 comments on commit 437a4be

Please sign in to comment.