Skip to content

Commit

Permalink
Fix crash when project hasn't exported translation files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarpsvo committed Oct 14, 2019
1 parent c7d2d76 commit aa848b1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/FieldServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ public function boot()
}

// Load project translation files
$projectTranslationFiles = File::files(resource_path('lang/vendor/nova-multiselect'));
foreach ($projectTranslationFiles as $file) {
Nova::translations($file->getPathName());
$projectTransFilesPath = resource_path('lang/vendor/nova-multiselect');
if (File::exists($projectTransFilesPath)) {
$projectTranslationFiles = File::files(resource_path('lang/vendor/nova-multiselect'));
foreach ($projectTranslationFiles as $file) {
Nova::translations($file->getPathName());
}
}
}
}
Expand Down

0 comments on commit aa848b1

Please sign in to comment.